forked from qt-creator/qt-creator
Debugger: Don't access unloaded perspectives
This can happen if a previous session marked a plugin for not loading and ended the session in a perspective provided by that plugin. Change-Id: I83a5dda421a1bb8ed2f8942f03e629e9c5d4d4ed Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -265,7 +265,7 @@ void DebuggerMainWindow::loadPerspectiveHelper(const QByteArray &perspectiveId,
|
||||
|
||||
ICore::removeAdditionalContext(Context(Id::fromName(m_currentPerspectiveId)));
|
||||
const Perspective *perspective = m_perspectiveForPerspectiveId.value(m_currentPerspectiveId);
|
||||
QWidget *central = perspective->centralWidget();
|
||||
QWidget *central = perspective ? perspective->centralWidget() : nullptr;
|
||||
m_centralWidgetStack->removeWidget(central ? central : m_editorPlaceHolder);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user