qmakeproject: fix crash when qtVersion is null

While it is not possible to create a qmake kit without qt, the qt
version might become invalid and be removed.

Change-Id: I99484c86d731ab5a47bff9bb1958158504617004
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Fawzi Mohamed
2014-04-03 10:16:48 +02:00
committed by Eike Ziller
parent 248180da15
commit 19d464dd72

View File

@@ -1001,7 +1001,7 @@ QtSupport::ProFileReader *QmakeProject::createProFileReader(const QmakeProFileNo
// It is important to override the spec file only for the creator evaluator,
// and not the qmake buildstep used to build the app (as we use the makefiles).
const char IOSQT[] = "Qt4ProjectManager.QtVersion.Ios"; // from Ios::Constants
if (qtVersion->type() == QLatin1String(IOSQT))
if (qtVersion && qtVersion->type() == QLatin1String(IOSQT))
m_qmakeGlobals->xqmakespec = QLatin1String("macx-xcode");
}
++m_qmakeGlobalsRefCnt;