diff options
-rw-r--r-- | qt-ui/divelistview.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp index 980939355..12243f468 100644 --- a/qt-ui/divelistview.cpp +++ b/qt-ui/divelistview.cpp @@ -340,7 +340,8 @@ void DiveListView::contextMenuEvent(QContextMenuEvent *event) popup.addAction(tr("remove dive from trip"), this, SLOT(removeFromTrip())); } } - popup.addAction(tr("delete dive"), this, SLOT(deleteDive())); + if (d) + popup.addAction(tr("delete dive"), this, SLOT(deleteDive())); // "collapse all" really closes all trips, // "collapse" keeps the trip with the selected dive open QAction * actionTaken = popup.exec(event->globalPos()); |