From 17b7bdfd2e7973c590d66819a8573a4ce8815e14 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 27 May 2015 06:54:00 -0700 Subject: 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 --- qt-ui/locationinformation.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'qt-ui/locationinformation.cpp') 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(); } -- cgit v1.2.3-70-g09d2