Crash: Fix crash when importing broken Qt versions

Fix a crash when importing a build, using a qmake that is broken.

I ran into this crash with a 32bit qmake used in a pure 64bit userland.

Change-Id: I08acb8d5f2cd72c873a30be5e45324f6daef702c
Reviewed-on: http://codereview.qt.nokia.com/2181
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
Tobias Hunger
2011-07-26 10:15:28 +00:00
parent 453ae2326f
commit 70a2f91d77

View File

@@ -370,7 +370,7 @@ void Qt4ProjectConfigWidget::updateImportLabel()
newVersion = QtSupport::QtVersionFactory::createQtVersionFromQMakePath(qmakePath); newVersion = QtSupport::QtVersionFactory::createQtVersionFromQMakePath(qmakePath);
mustDelete = true; mustDelete = true;
} }
targetMatches = newVersion->supportsTargetId(m_buildConfiguration->target()->id()); targetMatches = newVersion ? newVersion->supportsTargetId(m_buildConfiguration->target()->id()) : false;
if (mustDelete) if (mustDelete)
delete newVersion; delete newVersion;
} else { } else {