mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
gl: check null before unref GstGLDisplay
This commit is contained in:
parent
14bd147a2d
commit
4c65eca7be
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue