summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/maintab.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index 2b23bd5da..efbd3bc20 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -721,11 +721,11 @@ void MainTab::acceptChanges()
amount_selected = 1;
} else if (MainWindow::instance() && MainWindow::instance()->dive_list()->selectedTrips().count() == 1) {
/* now figure out if things have changed */
- if (!same_string(displayedTrip.notes, currentTrip->notes)) {
+ if (displayedTrip.notes && !same_string(displayedTrip.notes, currentTrip->notes)) {
currentTrip->notes = copy_string(displayedTrip.notes);
mark_divelist_changed(true);
}
- if (!same_string(displayedTrip.location, currentTrip->location)) {
+ if (displayedTrip.location && !same_string(displayedTrip.location, currentTrip->location)) {
currentTrip->location = copy_string(displayedTrip.location);
mark_divelist_changed(true);
}