QmlDesigner: Fix crash

Change-Id: Ic36fb5b01607bec9023ce61c6b8cdf5eae952b7f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Thomas Hartmann
2023-02-13 14:00:52 +01:00
parent 153279e686
commit 440bfbfd90

View File

@@ -455,6 +455,9 @@ int ToolBarBackend::currentKit() const
bool ToolBarBackend::isQt6() const
{
if (!ProjectExplorer::SessionManager::startupTarget())
return false;
const QmlProjectManager::QmlBuildSystem *buildSystem = qobject_cast<QmlProjectManager::QmlBuildSystem *>(
ProjectExplorer::SessionManager::startupTarget()->buildSystem());
QTC_ASSERT(buildSystem, return false);