diff --git a/configuredivecomputerthreads.cpp b/configuredivecomputerthreads.cpp index 418a7930e..50cdc6838 100644 --- a/configuredivecomputerthreads.cpp +++ b/configuredivecomputerthreads.cpp @@ -1508,17 +1508,15 @@ void ReadSettingsThread::run() supported = false; break; } + dc_device_close(m_data->device); + + if (!supported) { + lastError = tr("This feature is not yet available for the selected dive computer."); + emit error(lastError); + } } else { lastError = tr("Could not a establish connection to the dive computer."); emit error(lastError); - // So we don't trigger the "unsupported" clause later.. - supported = true; - } - dc_device_close(m_data->device); - - if (!supported) { - lastError = tr("This feature is not yet available for the selected dive computer."); - emit error(lastError); } }