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;