diff --git a/src/plugins/debugger/watchwindow.cpp b/src/plugins/debugger/watchwindow.cpp index 89a0296efaa..1c98f5f3097 100644 --- a/src/plugins/debugger/watchwindow.cpp +++ b/src/plugins/debugger/watchwindow.cpp @@ -893,7 +893,9 @@ void WatchTreeView::contextMenuEvent(QContextMenuEvent *ev) QAction *act = menu.exec(ev->globalPos()); - if (act == actInsertNewWatchItem) { + if (!act) { + ; + } else if (act == actInsertNewWatchItem) { bool ok; QString newExp = QInputDialog::getText(this, tr("Enter watch expression"), tr("Expression:"), QLineEdit::Normal,