From 5635272b44a8a5a79fbb073180ca8aa8414d1dab Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Fri, 27 Jul 2012 13:03:41 +0200 Subject: [PATCH] Improved check for NULL-pointer deref Change-Id: I99fac91fe997a8f6437998687cf9d30557fa818e Reviewed-by: Lasse Holmstedt --- .../qml/qmljsdebugger/editor/boundingrecthighlighter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/qtcreator/qml/qmljsdebugger/editor/boundingrecthighlighter.cpp b/share/qtcreator/qml/qmljsdebugger/editor/boundingrecthighlighter.cpp index b891b2a4be0..505d3461680 100644 --- a/share/qtcreator/qml/qmljsdebugger/editor/boundingrecthighlighter.cpp +++ b/share/qtcreator/qml/qmljsdebugger/editor/boundingrecthighlighter.cpp @@ -200,7 +200,8 @@ void BoundingRectHighlighter::itemDestroyed(QObject *obj) void BoundingRectHighlighter::highlightAll() { foreach (BoundingBox *box, m_boxes) { - if (box && box->highlightedObject.isNull()) { + Q_ASSERT(box); + if (box->highlightedObject.isNull()) { // clear all highlights clear(); return;