Commit add9e627 authored by hjk's avatar hjk Committed by hjk

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's avatarChristian Stenger <christian.stenger@qt.io>
parent 0651eddb
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment