From ad6fab9fb0ba85b3a1f7af28c55248c6230b3f88 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sun, 8 Dec 2013 06:05:54 +0100 Subject: Remove pointless code When removing the selected dives from their trips, it makes no sense to check if the pointer was actually pointing at a valid dive. Signed-off-by: Dirk Hohndel --- qt-ui/divelistview.cpp | 4 +--- 1 file changed, 1 insertion(+), 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(); - 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); -- cgit v1.2.3-70-g09d2