Don't crash when physically removing a device
This commit is contained in:
parent
ce1e7f73df
commit
44f0934fed
|
@ -459,10 +459,10 @@ void DeviceManager::PhysicalDeviceRemoved(const QString &id) {
|
|||
if (info.device_ && info.device_->lister() == lister)
|
||||
info.device_.reset();
|
||||
|
||||
emit dataChanged(index(i, 0), index(i, 0));
|
||||
|
||||
if (!info.device_)
|
||||
emit DeviceDisconnected(i);
|
||||
|
||||
emit dataChanged(index(i, 0), index(i, 0));
|
||||
} else {
|
||||
// If this was the last lister for the device then remove it from the model
|
||||
for (int backend_index = 0 ; backend_index < info.backends_.count() ; ++backend_index) {
|
||||
|
|
Loading…
Reference in New Issue