mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
cleanup: Improper use of negative value
CID 45112 Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit is contained in:
parent
2fb5a7d082
commit
686544bcef
1 changed files with 3 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue