mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 23:36:38 +00:00
glimagesink: Add NULL check in error case
Other context may be NULL if something went wrong. Avoid trying to unref a NULL pointer.
This commit is contained in:
parent
f58b5b65f1
commit
c68af4d6fc
1 changed files with 2 additions and 1 deletions
|
@ -744,7 +744,8 @@ _ensure_gl_setup (GstGLImageSink * gl_sink)
|
||||||
GST_PTR_FORMAT, gl_sink->context, other_context);
|
GST_PTR_FORMAT, gl_sink->context, other_context);
|
||||||
|
|
||||||
if (!gst_gl_context_create (gl_sink->context, other_context, &error)) {
|
if (!gst_gl_context_create (gl_sink->context, other_context, &error)) {
|
||||||
gst_object_unref (other_context);
|
if (other_context)
|
||||||
|
gst_object_unref (other_context);
|
||||||
gst_object_unref (window);
|
gst_object_unref (window);
|
||||||
goto context_error;
|
goto context_error;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue