diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp index ee893269256..4f4db64dfcb 100644 --- a/src/plugins/debugger/qml/qmlengine.cpp +++ b/src/plugins/debugger/qml/qmlengine.cpp @@ -1154,6 +1154,8 @@ void QmlEngine::updateCurrentContext() } else { QModelIndex currentIndex = inspectorTreeView()->currentIndex(); const WatchData *currentData = watchHandler()->watchData(currentIndex); + if (!currentData) + return; const WatchData *parentData = watchHandler()->watchData(currentIndex.parent()); const WatchData *grandParentData = watchHandler()->watchData( currentIndex.parent().parent());