gl: check null before unref GstGLDisplay

This commit is contained in:
Wang Xin-yu (王昕宇) 2014-08-20 09:37:01 +08:00 committed by Matthew Waters
parent 14bd147a2d
commit 4c65eca7be

View file

@ -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;