diff options
author | Robert Löhning <robert.loehning@qt.io> | 2021-07-06 14:04:33 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2021-07-07 09:45:52 +0000 |
commit | e065107fa537238aa65c097d24b649a0de9f5f9b (patch) | |
tree | a03fff89d38e22de9958225989371c0c60d7b69b | |
parent | 916fc90b448b71db911793cae252298e45d538dd (diff) |
QmlJSTools: Guard against null pointer accessv5.0.0-beta1
Fixes: QTCREATORBUG-25943
Change-Id: If9e6528b0dc5642dbd150e7d20aeb9347f3d4465
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>
-rw-r--r-- | src/plugins/qmljstools/qmljsmodelmanager.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/qmljstools/qmljsmodelmanager.cpp b/src/plugins/qmljstools/qmljsmodelmanager.cpp index 5eb2308368..c3092bf1cb 100644 --- a/src/plugins/qmljstools/qmljsmodelmanager.cpp +++ b/src/plugins/qmljstools/qmljsmodelmanager.cpp @@ -148,7 +148,7 @@ ModelManagerInterface::ProjectInfo ModelManager::defaultProjectInfoForProject( projectInfo.tryQmlDump = project && qtVersion->type() == QLatin1String(QtSupport::Constants::DESKTOPQT); projectInfo.qtQmlPath = qtVersion->qmlPath().toFileInfo().canonicalFilePath(); projectInfo.qtVersionString = qtVersion->qtVersionString(); - } else if (!activeKit->value(QtSupport::SuppliesQtQuickImportPath::id(), false).toBool()) { + } else if (!activeKit || !activeKit->value(QtSupport::SuppliesQtQuickImportPath::id(), false).toBool()) { projectInfo.qtQmlPath = QFileInfo(QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath)).canonicalFilePath(); projectInfo.qtVersionString = QLatin1String(qVersion()); } |