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 <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2015-01-08 11:56:00 -02:00 committed by Dirk Hohndel
parent afafbb3a3e
commit 6b11f94996

View file

@ -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();