Initialize sink before trying to fill it via g_object_get()
authorMohammed Sameer <msameer@foolab.org>
Mon, 7 Jan 2013 22:03:51 +0000 (00:03 +0200)
committerMohammed Sameer <msameer@foolab.org>
Mon, 7 Jan 2013 22:03:51 +0000 (00:03 +0200)
lib/qtcamdevice_p.h

index d532ab5..7421652 100644 (file)
@@ -101,7 +101,7 @@ public:
   }
 
   bool setViewfinderSink() {
-    GstElement *sink;
+    GstElement *sink = 0;
     g_object_get(cameraBin, "viewfinder-sink", &sink, NULL);
 
     if (sink) {