summaryrefslogtreecommitdiff
path: root/src/plugins/debugger/debuggermainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/debugger/debuggermainwindow.cpp')
-rw-r--r--src/plugins/debugger/debuggermainwindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/debugger/debuggermainwindow.cpp b/src/plugins/debugger/debuggermainwindow.cpp
index d3d5ceb3f8..7821532832 100644
--- a/src/plugins/debugger/debuggermainwindow.cpp
+++ b/src/plugins/debugger/debuggermainwindow.cpp
@@ -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);
}