aboutsummaryrefslogtreecommitdiff
path: root/smartpenmanager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'smartpenmanager.cc')
-rw-r--r--smartpenmanager.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/smartpenmanager.cc b/smartpenmanager.cc
index d560b5b..ad6416b 100644
--- a/smartpenmanager.cc
+++ b/smartpenmanager.cc
@@ -42,7 +42,10 @@ void SmartpenManager::handleMonitorActivity()
{
qDebug() << "udev activity";
udev_device *dev = udev_monitor_receive_device(_monitor);
- udev_device_unref(dev);
+ if (dev) {
+ processDevice(dev);
+ udev_device_unref(dev);
+ }
}
void SmartpenManager::handleSyncerFinished()