gst/gstghostpad.c: Unlinking from a pad without a target is now a perfectly valid case which should NOT raise an asse...

Original commit message from CVS:
* gst/gstghostpad.c: (gst_ghost_pad_do_unlink):
Unlinking from a pad without a target is now a perfectly valid case
which should NOT raise an assertion.
This case would happen if a linked ghostpad its target set to NULL after
it was previously linked.
This commit is contained in:
Edward Hervey 2006-08-08 16:24:58 +00:00
parent d65deaccae
commit 2d6d262e86
2 changed files with 11 additions and 4 deletions

View file

@ -1,3 +1,11 @@
2006-08-08 Edward Hervey <edward@fluendo.com>
* gst/gstghostpad.c: (gst_ghost_pad_do_unlink):
Unlinking from a pad without a target is now a perfectly valid case
which should NOT raise an assertion.
This case would happen if a linked ghostpad its target set to NULL after
it was previously linked.
2006-08-08 Edward Hervey <edward@fluendo.com>
* tests/check/libs/gdp.c:

View file

@ -683,17 +683,16 @@ gst_ghost_pad_do_unlink (GstPad * pad)
GstPad *target = gst_proxy_pad_get_target (pad);
GstPad *internal = gst_proxy_pad_get_internal (pad);
g_return_if_fail (target != NULL);
GST_DEBUG_OBJECT (pad, "unlinking ghostpad");
/* The target of the internal pad is no longer valid */
gst_proxy_pad_set_target (internal, NULL);
if (target->unlinkfunc)
if (target && target->unlinkfunc)
target->unlinkfunc (target);
gst_object_unref (target);
if (target)
gst_object_unref (target);
gst_object_unref (internal);
}