summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/downloadfromdcthread.cpp4
-rw-r--r--mobile-widgets/qml/DownloadFromDiveComputer.qml2
2 files changed, 6 insertions, 0 deletions
diff --git a/core/downloadfromdcthread.cpp b/core/downloadfromdcthread.cpp
index a9c8ce70b..8e937346d 100644
--- a/core/downloadfromdcthread.cpp
+++ b/core/downloadfromdcthread.cpp
@@ -71,6 +71,10 @@ void DownloadThread::run()
internalData->descriptor = descriptorLookup[m_data->vendor() + m_data->product()];
internalData->download_table = &downloadTable;
internalData->btname = strdup(m_data->devBluetoothName().toUtf8());
+ if (!internalData->descriptor) {
+ qDebug() << "No download possible when DC type is unknown";
+ return;
+ }
#if defined(Q_OS_ANDROID)
// on Android we either use BT, a USB device, or we download via FTDI cable
if (!internalData->bluetooth_mode && (same_string(internalData->devname, "FTDI") || same_string(internalData->devname, "")))
diff --git a/mobile-widgets/qml/DownloadFromDiveComputer.qml b/mobile-widgets/qml/DownloadFromDiveComputer.qml
index 8a8bf2d74..729fe3c20 100644
--- a/mobile-widgets/qml/DownloadFromDiveComputer.qml
+++ b/mobile-widgets/qml/DownloadFromDiveComputer.qml
@@ -273,6 +273,8 @@ Kirigami.Page {
SsrfButton {
id: download
text: qsTr("Download")
+ enabled: comboVendor.currentIndex != -1 && comboProduct.currentIndex != -1 &&
+ comboConnection.currentIndex != -1
onClicked: {
text = qsTr("Retry")
// strip any BT Name from the address