]> Devoid-pointer.net GitWeb - FFBChecker.git/commitdiff
Close Linux FFBDevice is capability query fails.
authorMichal Malý <madcatxster@devoid-pointer.net>
Fri, 31 Jul 2015 00:29:07 +0000 (02:29 +0200)
committerMichal Malý <madcatxster@devoid-pointer.net>
Fri, 31 Jul 2015 00:29:07 +0000 (02:29 +0200)
linuxdeviceprober.cpp

index 6134ceeccf6d324ff0f2cbccf2ca35f74d801e82..62a9726c5cf89d6bf87411cc7ab1868b9f6d0b22 100644 (file)
@@ -82,6 +82,7 @@ std::shared_ptr<FFBDevice> LinuxDeviceProber::openDevice(const QString& id)
   std::shared_ptr<LinuxFFBDevice> device(new LinuxFFBDevice(fd, maxEffectCount, id));
   if (!device->queryDeviceCapabilities()) {
     QMessageBox::critical(nullptr, res_ffbdeviceErrCap, "Unable to query device capabilities.");
+    device->close();
     return nullptr;
   }