Commit e0c9d4f8 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

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().
parent 1ec81147
Pipeline #29598 passed with stages
in 64 minutes and 47 seconds
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment