mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 20:05:38 +00:00
controlbinding: Check if the weak pointer was cleared before explicitly removing it
Otherwise we'll get an assertion if the object behind the weak pointer was already destroyed in the meantime as we would pass NULL as first argument to g_object_remove_weak_pointer().
This commit is contained in:
parent
1ec8114717
commit
e0c9d4f879
1 changed files with 3 additions and 2 deletions
|
@ -172,8 +172,9 @@ gst_control_binding_dispose (GObject * object)
|
|||
GstControlBinding *self = GST_CONTROL_BINDING (object);
|
||||
|
||||
/* we did not took a reference */
|
||||
g_object_remove_weak_pointer ((GObject *) self->__object,
|
||||
(gpointer *) & self->__object);
|
||||
if (self->__object)
|
||||
g_object_remove_weak_pointer ((GObject *) self->__object,
|
||||
(gpointer *) & self->__object);
|
||||
self->__object = NULL;
|
||||
g_weak_ref_clear (&self->ABI.abi.priv->object);
|
||||
|
||||
|
|
Loading…
Reference in a new issue