summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/locationinformation.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/qt-ui/locationinformation.cpp b/qt-ui/locationinformation.cpp
index 657a6f3f5..6dc77c571 100644
--- a/qt-ui/locationinformation.cpp
+++ b/qt-ui/locationinformation.cpp
@@ -126,8 +126,7 @@ void LocationInformationWidget::acceptChanges()
void LocationInformationWidget::rejectChanges()
{
- Q_ASSERT(currentDs != NULL);
- if (dive_site_is_empty(currentDs)) {
+ if (currentDs && dive_site_is_empty(currentDs)) {
delete_dive_site(currentDs->uuid);
displayed_dive.dive_site_uuid = 0;
}