projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f58b5b6
)
glimagesink: Add NULL check in error case
author
Nicolas Dufresne
<nicolas.dufresne@collabora.com>
Sat, 14 Mar 2015 12:58:22 +0000
(12:58 +0000)
committer
Tim-Philipp Müller
<tim@centricular.com>
Sat, 9 Dec 2017 19:31:58 +0000
(19:31 +0000)
Other context may be NULL if something went wrong. Avoid trying to unref
a NULL pointer.
ext/gl/gstglimagesink.c
patch
|
blob
|
history
diff --git
a/ext/gl/gstglimagesink.c
b/ext/gl/gstglimagesink.c
index
4ec4ec1
..
68e1622
100644
(file)
--- a/
ext/gl/gstglimagesink.c
+++ b/
ext/gl/gstglimagesink.c
@@
-744,7
+744,8
@@
_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)) {
- gst_object_unref (other_context);
+ if (other_context)
+ gst_object_unref (other_context);
gst_object_unref (window);
goto context_error;
}