forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
Reference in New Issue
Block a user