forked from qt-creator/qt-creator
StudioWelcome: Fix crash
We have to if the project actually has a QmlBuildSystem. Task-number: QDS-9804 Change-Id: I1740f1c0772641888a8828b10380f442308bfe46 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -113,6 +113,9 @@ static Utils::FilePath getMainUiFileWithFallback()
|
|||||||
auto qmlBuildSystem = qobject_cast<QmlProjectManager::QmlBuildSystem *>(
|
auto qmlBuildSystem = qobject_cast<QmlProjectManager::QmlBuildSystem *>(
|
||||||
project->activeTarget()->buildSystem());
|
project->activeTarget()->buildSystem());
|
||||||
|
|
||||||
|
if (!qmlBuildSystem)
|
||||||
|
return {};
|
||||||
|
|
||||||
auto mainUiFile = qmlBuildSystem->mainUiFilePath();
|
auto mainUiFile = qmlBuildSystem->mainUiFilePath();
|
||||||
if (mainUiFile.exists())
|
if (mainUiFile.exists())
|
||||||
return mainUiFile;
|
return mainUiFile;
|
||||||
|
Reference in New Issue
Block a user