examples: camerabin: remove assertion on null property
authorThiago Santos <thiago.sousa.santos@collabora.com>
Sat, 28 Jul 2012 15:09:42 +0000 (12:09 -0300)
committerThiago Santos <thiago.sousa.santos@collabora.com>
Sat, 28 Jul 2012 15:10:41 +0000 (12:10 -0300)
Check if the flags are not null before trying to set them to
camerabin to avoid an assertion

tests/examples/camerabin2/gst-camerabin2-test.c

index f72467d86892ada6535657222581f7cc48eb5a43..e5ad385ac5045f7244478fb51b42d3d5155a1510 100644 (file)
@@ -679,7 +679,10 @@ setup_pipeline (void)
 
   GST_INFO_OBJECT (camerabin, "camerabin created");
 
-  gst_util_set_object_arg (G_OBJECT (camerabin), "flags", camerabin_flags);
+  if (camerabin_flags)
+    gst_util_set_object_arg (G_OBJECT (camerabin), "flags", camerabin_flags);
+  else
+    gst_util_set_object_arg (G_OBJECT (camerabin), "flags", "");
 
   if (videosrc_name) {
     GstElement *wrapper;