From 6b11f94996da1aa8b9291e2e7b491c24d9713604 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Thu, 8 Jan 2015 11:56:00 -0200 Subject: Dive d/l selection UI: Only try to get the dive list if d/l succeeded This fixes a crash where we tried to get the data without actually having downloaded anything. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/downloadfromdivecomputer.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'qt-ui') diff --git a/qt-ui/downloadfromdivecomputer.cpp b/qt-ui/downloadfromdivecomputer.cpp index 08ba9408d..3181faba8 100644 --- a/qt-ui/downloadfromdivecomputer.cpp +++ b/qt-ui/downloadfromdivecomputer.cpp @@ -405,6 +405,9 @@ void DownloadFromDCWidget::onDownloadThreadFinished() void DownloadFromDCWidget::on_ok_clicked() { + if (currentState != DONE) + return; + // remove all unselected dives from the dive-list. diveImportedModel->removeUnused(); -- cgit v1.2.3-70-g09d2