mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +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) {
|
if (replacement) {
|
||||||
GstGLDisplay *old = *display;
|
GstGLDisplay *old = *display;
|
||||||
*display = replacement;
|
*display = replacement;
|
||||||
gst_object_unref (old);
|
|
||||||
|
if (old)
|
||||||
|
gst_object_unref (old);
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
Loading…
Reference in a new issue