Don't try to set the device property on the video source if id is null or is not...
authorMohammed Sameer <msameer@foolab.org>
Thu, 30 Aug 2012 17:40:58 +0000 (20:40 +0300)
committerMohammed Sameer <msameer@foolab.org>
Thu, 6 Sep 2012 16:10:09 +0000 (19:10 +0300)
lib/qtcamdevice_p.h

index 5a2240a..fd4bf96 100644 (file)
@@ -73,6 +73,10 @@ public:
     videoSource = src;
     wrapperVideoSource = wrapper;
 
+    if (!id.isValid() || id.isNull()) {
+      return;
+    }
+
     if (conf->deviceScannerType() == SCANNER_TYPE_ENUM) {
       int dev = id.toInt();
       g_object_set(src, conf->deviceScannerProperty().toAscii().data(), dev, NULL);