ios: check also if rootQmakeNode is null

Change-Id: Id02c059045e486a02dfcf4f299860f3d953c395b
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This commit is contained in:
Fawzi Mohamed
2014-03-26 16:57:57 +01:00
parent 5a6d5d6649
commit da20bc9f27

View File

@@ -182,15 +182,16 @@ QString IosRunConfiguration::profilePath() const
QString IosRunConfiguration::appName() const
{
QmakeProject *pro = qobject_cast<QmakeProject *>(target()->project());
if (pro) {
const QmakeProFileNode *node = pro->rootQmakeProjectNode()->findProFileFor(profilePath());
if (node) {
TargetInformation ti = node->targetInformation();
if (ti.valid)
return ti.target;
}
const QmakeProFileNode *node = 0;
if (pro)
node = pro->rootQmakeProjectNode();
if (node)
node = node->findProFileFor(profilePath());
if (node) {
TargetInformation ti = node->targetInformation();
if (ti.valid)
return ti.target;
}
qDebug() << "IosRunConfiguration::appName failed";
return QString();
}
@@ -207,7 +208,11 @@ Utils::FileName IosRunConfiguration::bundleDir() const
qobject_cast<QmakeBuildConfiguration *>(target()->activeBuildConfiguration());
if (bc) {
QmakeProject *pro = qobject_cast<QmakeProject *>(target()->project());
const QmakeProFileNode *node = pro->rootQmakeProjectNode()->findProFileFor(profilePath());
const QmakeProFileNode *node = 0;
if (pro)
node = pro->rootQmakeProjectNode();
if (node)
node = node->findProFileFor(profilePath());
if (node) {
TargetInformation ti = node->targetInformation();
if (ti.valid)