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
13049caaf2
commit
ac89e53173
@ -744,6 +744,7 @@ _ensure_gl_setup (GstGLImageSink * gl_sink)
|
||||
GST_PTR_FORMAT, gl_sink->context, other_context);
|
||||
|
||||
if (!gst_gl_context_create (gl_sink->context, other_context, &error)) {
|
||||
if (other_context)
|
||||
gst_object_unref (other_context);
|
||||
gst_object_unref (window);
|
||||
goto context_error;
|
||||
|
Loading…
x
Reference in New Issue
Block a user