diff options
Diffstat (limited to 'desktop-widgets/undocommands.cpp')
-rw-r--r-- | desktop-widgets/undocommands.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/desktop-widgets/undocommands.cpp b/desktop-widgets/undocommands.cpp index e1852832d..de3c01cff 100644 --- a/desktop-widgets/undocommands.cpp +++ b/desktop-widgets/undocommands.cpp @@ -62,7 +62,9 @@ void UndoDeleteDive::redo() tripList.append(undo_trip); } //delete the dive - delete_single_dive(get_divenr(diveList.at(i))); + int nr; + if ((nr = get_divenr(diveList.at(i))) >= 0) + delete_single_dive(nr); } mark_divelist_changed(true); MainWindow::instance()->refreshDisplay(); |