summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/divelistview.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp
index 422d1d21c..a1c4cf7fc 100644
--- a/qt-ui/divelistview.cpp
+++ b/qt-ui/divelistview.cpp
@@ -543,9 +543,7 @@ void DiveListView::mergeTripBelow()
void DiveListView::removeFromTrip()
{
int i;
- struct dive *d = (struct dive *) contextMenuIndex.data(DiveTripModel::DIVE_ROLE).value<void*>();
- if (!d) // shouldn't happen as we only are setting up this action if this is a dive
- return;
+ struct dive *d;
for_each_dive(i, d) {
if (d->selected)
remove_dive_from_trip(d);