Debugger: Fix possible nullptr access

Change-Id: I8a764375f3d62f644b4621d41d82afbcdbdd9415
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2018-08-27 12:18:42 +02:00
committed by David Schulz
parent 893146b8b6
commit b5b366f562

View File

@@ -333,9 +333,10 @@ void EngineManagerPrivate::activateEngineItem(EngineItem *engineItem)
void EngineManagerPrivate::selectUiForCurrentEngine()
{
if (!Perspective::currentPerspective()->id().startsWith("Debugger.Perspective."))
Perspective *perspective = Perspective::currentPerspective();
if (perspective && !perspective->id().startsWith("Debugger.Perspective."))
return;
Perspective *perspective = nullptr;
perspective = nullptr;
int row = 0;
if (m_currentItem && m_currentItem->m_engine) {