From: Wang Xin-yu (王昕宇) Date: Wed, 20 Aug 2014 01:37:01 +0000 (+0800) Subject: gl: check null before unref GstGLDisplay X-Git-Tag: accepted/tizen/unified/20220217.153506~2^2~10^2~9^2~12^2~2^2~259 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dad05c201ea804225155f778ae5d15d912d4d249;p=platform%2Fupstream%2Fgstreamer.git gl: check null before unref GstGLDisplay --- diff --git a/gst-libs/gst/gl/gstglutils.c b/gst-libs/gst/gl/gstglutils.c index 2e1b0dd..c2ea06f 100644 --- a/gst-libs/gst/gl/gstglutils.c +++ b/gst-libs/gst/gl/gstglutils.c @@ -770,7 +770,9 @@ gst_gl_handle_set_context (GstElement * element, GstContext * context, if (replacement) { GstGLDisplay *old = *display; *display = replacement; - gst_object_unref (old); + + if (old) + gst_object_unref (old); } return TRUE;