aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Hartmann <thomas.hartmann@qt.io>2022-02-25 09:32:27 +0100
committerThomas Hartmann <thomas.hartmann@qt.io>2022-02-25 10:27:41 +0000
commite7b9c3cdde45633db540a9036fca53733d5cdc43 (patch)
treee5b3949b6116aa755d3ad3a8116562d34d6eb997
parentd0eb2c7428066f7c5d6963086d8f903a8e3074a0 (diff)
Fix crash
If the StudioWelcomePage is used, then SessionPage is not created and m_projectModel is initialized in the constructor of SessionPage. Task-numnber: QDS-6332 Change-Id: If64bfcb42bc2616d68456aa08bb4c03a4f9e15f1 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
-rw-r--r--src/plugins/projectexplorer/projectwelcomepage.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/projectexplorer/projectwelcomepage.cpp b/src/plugins/projectexplorer/projectwelcomepage.cpp
index 6607454443..7356cdd2f5 100644
--- a/src/plugins/projectexplorer/projectwelcomepage.cpp
+++ b/src/plugins/projectexplorer/projectwelcomepage.cpp
@@ -142,6 +142,7 @@ ProjectWelcomePage::ProjectWelcomePage()
cmd = ActionManager::registerAction(act, projectBase.withSuffix(i), welcomeContext);
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+%1").arg(i)));
connect(act, &QAction::triggered, this, [this, i] {
+ QTC_ASSERT(m_projectModel, return);
if (i <= m_projectModel->rowCount(QModelIndex()))
openProjectAt(i - 1);
});