Don't try to set the device property on the video source if id is null or is not...
[harmattan/cameraplus] / 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);