From 7ab77c6b324db6c7a7764d691f4365ddd3524e1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 25 Jun 2012 16:07:31 +0200 Subject: [PATCH] playsink: Prevent NULL pointer dereference in last change --- gst/playback/gstplaysink.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gst/playback/gstplaysink.c b/gst/playback/gstplaysink.c index c0249dfc35..a04dfeaca9 100644 --- a/gst/playback/gstplaysink.c +++ b/gst/playback/gstplaysink.c @@ -3115,8 +3115,10 @@ gst_play_sink_reconfigure (GstPlaySink * playsink) GST_DEBUG_OBJECT (playsink, "ghosting video sinkpad"); gst_pad_unlink (playsink->video_srcpad_stream_synchronizer, playsink->videochain->sinkpad); - gst_pad_unlink (playsink->videodeinterlacechain->srcpad, - playsink->videochain->sinkpad); + if (playsink->videodeinterlacechain + && playsink->videodeinterlacechain->srcpad) + gst_pad_unlink (playsink->videodeinterlacechain->srcpad, + playsink->videochain->sinkpad); if (need_deinterlace) gst_pad_link_full (playsink->videodeinterlacechain->srcpad, playsink->videochain->sinkpad, GST_PAD_LINK_CHECK_NOTHING);