From: Wim Taymans Date: Fri, 28 Apr 2006 13:10:07 +0000 (+0000) Subject: gst/gstminiobject.c: Taking a NULL miniobject is valid, fix the case where we try... X-Git-Tag: RELEASE-0_10_6~84 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=520c15d134f1b9c6525c5fb3da5a1af8bcb7cd66;p=platform%2Fupstream%2Fgstreamer.git gst/gstminiobject.c: Taking a NULL miniobject is valid, fix the case where we try to unref the NULL miniobject. Original commit message from CVS: * gst/gstminiobject.c: (gst_value_take_mini_object): Taking a NULL miniobject is valid, fix the case where we try to unref the NULL miniobject. --- diff --git a/ChangeLog b/ChangeLog index ed4776a..a6cb633 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2006-04-28 Wim Taymans + * gst/gstminiobject.c: (gst_value_take_mini_object): + Taking a NULL miniobject is valid, fix the case where + we try to unref the NULL miniobject. + +2006-04-28 Wim Taymans + Patch by: Stefan Kost * gst/gstbin.c: (gst_bin_handle_message_func): diff --git a/gst/gstminiobject.c b/gst/gstminiobject.c index 2e0569e..279ec73 100644 --- a/gst/gstminiobject.c +++ b/gst/gstminiobject.c @@ -425,8 +425,11 @@ gst_value_take_mini_object (GValue * value, GstMiniObject * mini_object) g_return_if_fail (mini_object == NULL || GST_IS_MINI_OBJECT (mini_object)); pointer_p = &value->data[0].v_pointer; + /* takes additional refcount */ gst_mini_object_replace ((GstMiniObject **) pointer_p, mini_object); - gst_mini_object_unref (mini_object); + /* remove additional refcount */ + if (mini_object) + gst_mini_object_unref (mini_object); } /**