mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-13 04:41:16 +00:00
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:
parent
8502aeb580
commit
520c15d134
2 changed files with 10 additions and 1 deletions
|
@ -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>
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue