From 44f0934fed3c070f3acfc1eb5bc0d19666ae6cdb Mon Sep 17 00:00:00 2001 From: David Sansome Date: Sat, 18 Sep 2010 13:54:23 +0000 Subject: [PATCH] Don't crash when physically removing a device --- src/devices/devicemanager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/devices/devicemanager.cpp b/src/devices/devicemanager.cpp index 6259efd40..ba55bb529 100644 --- a/src/devices/devicemanager.cpp +++ b/src/devices/devicemanager.cpp @@ -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) {