DeviceManager: Add nullptr check for connected device

Possible fix for #1313
This commit is contained in:
Jonas Kvinge 2024-01-11 17:03:00 +01:00
parent 8d1a0071b6
commit a4b7766947
1 changed files with 1 additions and 1 deletions

View File

@ -830,7 +830,7 @@ void DeviceManager::DeviceTaskStarted(const int id) {
for (int i = 0; i < devices_.count(); ++i) {
DeviceInfo *info = devices_[i];
if (&*info->device_ == device) {
if (info->device_ && &*info->device_ == device) {
QModelIndex index = ItemToIndex(info);
if (!index.isValid()) continue;
active_tasks_[id] = index;