mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
gl: check null before unref GstGLDisplay
This commit is contained in:
parent
ac2fdb0aed
commit
c8d1e4ad5f
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