summaryrefslogtreecommitdiffstats
path: root/qt-ui/locationinformation.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-05-27 06:54:00 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-05-27 07:53:14 -0700
commit17b7bdfd2e7973c590d66819a8573a4ce8815e14 (patch)
treedad4484806c724b30d14d412ab50a1bb4bacd686 /qt-ui/locationinformation.cpp
parentd6e32b02f69b99796f83c9e964f63963ec4b1800 (diff)
downloadsubsurface-17b7bdfd2e7973c590d66819a8573a4ce8815e14.tar.gz
Fix crash when rejecting dive site changes
Emitting the stopFilterDiveSite signal caused us to clean up the UI which reset currentDs to NULL if this was a new dive site... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/locationinformation.cpp')
-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 5f17e6f29..e2fa8466f 100644
--- a/qt-ui/locationinformation.cpp
+++ b/qt-ui/locationinformation.cpp
@@ -166,14 +166,13 @@ void LocationInformationWidget::acceptChanges()
void LocationInformationWidget::rejectChanges()
{
- emit stopFilterDiveSite();
Q_ASSERT(currentDs != NULL);
if (dive_site_is_empty(currentDs)) {
delete_dive_site(currentDs->uuid);
displayed_dive.dive_site_uuid = 0;
}
-
resetState();
+ emit stopFilterDiveSite();
emit informationManagementEnded();
emit coordinatesChanged();
}