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.
This commit is contained in:
Wim Taymans 2006-04-28 13:10:07 +00:00
parent 8502aeb580
commit 520c15d134
2 changed files with 10 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2006-04-28 Wim Taymans <wim@fluendo.com>
* 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 <wim@fluendo.com>
Patch by: Stefan Kost <ensonic at sonicpulse dot de>

View file

@ -425,7 +425,10 @@ 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);
/* remove additional refcount */
if (mini_object)
gst_mini_object_unref (mini_object);
}