From 25bfcf5f6d0ed9a16705dcd2ae095daf6c852dd1 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 3 Dec 2013 15:17:38 -0800 Subject: Don't call fixup_dive when editing a trip When editing a trip the key for the notesBackup is NULL. Don't call fixup_dive() on that... Signed-off-by: Dirk Hohndel --- qt-ui/maintab.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'qt-ui/maintab.cpp') diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index dad1e8ec6..a36cb9130 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -614,7 +614,8 @@ void MainTab::acceptChanges() // each dive that was selected might have had the temperatures in its active divecomputer changed // so re-populate the temperatures - easiest way to do this is by calling fixup_dive Q_FOREACH(dive *d, notesBackup.keys()) { - fixup_dive(d); + if (d) + fixup_dive(d); } editMode = NONE; -- cgit v1.2.3-70-g09d2