summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Martin Gysel <me@bearsh.org>2013-12-07 13:25:17 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-12-07 07:27:46 -0800
commitd9ca999a17a45b5c993ed1a693c4c4e386393ec0 (patch)
treeb0201eed17fb80e165f2d4d9297aac8d6d123de2
parent26dab9b5ced06695e5a8130dac42948f0cbfb915 (diff)
downloadsubsurface-d9ca999a17a45b5c993ed1a693c4c4e386393ec0.tar.gz
redraw profile (actually clean it) if no dive is selected
otherwise the previous selected dive is still visible in the profile view. clicking on edit crashs subsurface: null pointer dereference in editCurrentDive as it uses 'current_dive' which is null. Signed-off-by: Martin Gysel <me@bearsh.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/mainwindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index e4569911b..78868e683 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -86,8 +86,8 @@ void MainWindow::current_dive_changed(int divenr)
if (divenr >= 0) {
select_dive(divenr);
ui.globe->centerOn(get_dive(selected_dive));
- redrawProfile();
}
+ redrawProfile();
ui.InfoWidget->updateDiveInfo(divenr);
}