Debugger: Avoid null pointer access

Change-Id: I85cc637d60797bfa182c045b81d3520919bbfde9
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Stenger
2016-09-21 14:56:59 +02:00
parent 4d47a68425
commit ae3483da27

View File

@@ -1056,7 +1056,7 @@ bool WatchModel::setData(const QModelIndex &idx, const QVariant &value, int role
} }
if (ev.as<QMouseEvent>(QEvent::MouseButtonDblClick)) { if (ev.as<QMouseEvent>(QEvent::MouseButtonDblClick)) {
if (!item->parent()) { // if item is the invisible root item if (item && !item->parent()) { // if item is the invisible root item
inputNewExpression(); inputNewExpression();
return true; return true;
} }