From 4602fdb52f91e1168c7e9bc6f34ce595d2aa4e1b Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 26 Feb 2015 15:42:30 +0100 Subject: [PATCH] QmlEngine: Avoid accessing null pointer Change-Id: I41ff4508ae609f481a5a20e4b398e106f2d3093d Reviewed-by: hjk --- src/plugins/debugger/qml/qmlengine.cpp | 2 ++ 1 file changed, 2 insertions(+) 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());