diff --git a/src/devices/deviceproperties.cpp b/src/devices/deviceproperties.cpp index cc8f85067..c097d409d 100644 --- a/src/devices/deviceproperties.cpp +++ b/src/devices/deviceproperties.cpp @@ -252,9 +252,14 @@ void DeviceProperties::accept() { ui_->transcode_format->itemData(ui_->transcode_format->currentIndex()) .toInt()); - manager_->SetDeviceOptions( - index_.row(), ui_->name->text(), - ui_->icon->currentItem()->data(Qt::UserRole).toString(), mode, format); + // By default no icon is selected and thus no current item is selected + QString icon_name; + if (ui_->icon->currentItem() != nullptr) { + icon_name = ui_->icon->currentItem()->data(Qt::UserRole).toString(); + } + + manager_->SetDeviceOptions(index_.row(), ui_->name->text(), icon_name, mode, + format); } void DeviceProperties::OpenDevice() { manager_->Connect(index_.row()); }