From 233b09f9b9e9044809dea8dbd300dc7e9bb4d881 Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Tue, 8 Jun 2010 09:14:01 -0300 Subject: [PATCH] camerabin: Do not assert on set_property to NULL for elements Check if the value is NULL before reffing them in set_property for 'GstElement' properties --- gst/camerabin/gstcamerabin.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gst/camerabin/gstcamerabin.c b/gst/camerabin/gstcamerabin.c index 7630d181f5..f68253e4e8 100644 --- a/gst/camerabin/gstcamerabin.c +++ b/gst/camerabin/gstcamerabin.c @@ -3306,7 +3306,8 @@ gst_camerabin_set_property (GObject * object, guint prop_id, if (camera->app_vf_sink) gst_object_unref (camera->app_vf_sink); camera->app_vf_sink = g_value_get_object (value); - gst_object_ref (camera->app_vf_sink); + if (camera->app_vf_sink) + gst_object_ref (camera->app_vf_sink); } break; case ARG_VIDEO_SRC: @@ -3318,7 +3319,8 @@ gst_camerabin_set_property (GObject * object, guint prop_id, if (camera->app_vid_src) gst_object_unref (camera->app_vid_src); camera->app_vid_src = g_value_get_object (value); - gst_object_ref (camera->app_vid_src); + if (camera->app_vid_src) + gst_object_ref (camera->app_vid_src); } break; case ARG_AUDIO_SRC: