From d9ca999a17a45b5c993ed1a693c4c4e386393ec0 Mon Sep 17 00:00:00 2001 From: Martin Gysel Date: Sat, 7 Dec 2013 13:25:17 +0100 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-ui/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qt-ui/mainwindow.cpp') 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); } -- cgit v1.2.3-70-g09d2