diff --git a/Source/GUI/MemWatcher/MemWatchWidget.cpp b/Source/GUI/MemWatcher/MemWatchWidget.cpp index 90c5aac..25b7e30 100644 --- a/Source/GUI/MemWatcher/MemWatchWidget.cpp +++ b/Source/GUI/MemWatcher/MemWatchWidget.cpp @@ -274,9 +274,9 @@ void MemWatchWidget::onMemWatchContextMenuRequested(const QPoint& pos) connect(copy, &QAction::triggered, this, [this] { copySelectedWatchesToClipBoard(); }); contextMenu->addAction(copy); - if (index.isValid()) + MemWatchEntry* const entry{MemWatchModel::getEntryFromIndex(index)}; + if (entry) { - MemWatchEntry* const entry = m_watchModel->getEntryFromIndex(index); if (entry->isBoundToPointer()) { QMenu* const copyAddrSubmenu = contextMenu->addMenu(tr("Copy add&ress..."));