From: David Schleef Date: Tue, 30 Dec 2003 19:11:03 +0000 (+0000) Subject: Fix segfault caused by last checkin X-Git-Tag: BRANCH-RELEASE-0_7_4-ROOT~206 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1933a78c8e1408e2beda362a23f9d34cdec7dc33;p=platform%2Fupstream%2Fgstreamer.git Fix segfault caused by last checkin Original commit message from CVS: Fix segfault caused by last checkin --- diff --git a/ChangeLog b/ChangeLog index 0798135..556cac7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-12-30 David Schleef + + * gst/gstpad.c: (gst_pad_link_try): + Fix segfault when attempting to return to old caps + 2003-12-29 David Schleef * gst/gstcaps.c: (gst_caps_normalize), (simplify_foreach), diff --git a/gst/gstpad.c b/gst/gstpad.c index caa68bd..2dedd5d 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -1205,10 +1205,13 @@ gst_pad_link_try (GstPadLink *link) ret = gst_pad_link_negotiate (link); if (ret == GST_PAD_LINK_REFUSED) { - oldlink->srcnotify = link->srcnotify; - oldlink->sinknotify = link->sinknotify; - if (oldlink && oldlink->caps && !gst_pad_link_call_link_functions (oldlink)) - g_warning ("pads don't accept old caps. We assume they did though"); + if (oldlink && oldlink->caps) { + oldlink->srcnotify = link->srcnotify; + oldlink->sinknotify = link->sinknotify; + if (!gst_pad_link_call_link_functions (oldlink)) { + g_warning ("pads don't accept old caps. We assume they did though"); + } + } gst_pad_link_free (link); return ret; }