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 <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2013-12-03 15:17:38 -08:00
parent 7c8e95e1b5
commit 25bfcf5f6d

View file

@ -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;