gl: guard against using a NULL window pointer

Coverity 1195145
This commit is contained in:
Vincent Penquerc'h 2014-04-21 09:50:19 +01:00 committed by Tim-Philipp Müller
parent c728fd3b8d
commit d6a87fb0c3

View file

@ -1198,8 +1198,10 @@ gst_glimage_sink_redisplay (GstGLImageSink * gl_sink)
gboolean alive; gboolean alive;
window = gst_gl_context_get_window (gl_sink->context); window = gst_gl_context_get_window (gl_sink->context);
if (!window)
return FALSE;
if (window && gst_gl_window_is_running (window)) { if (gst_gl_window_is_running (window)) {
#if GST_GL_HAVE_GLES2 #if GST_GL_HAVE_GLES2
if (USING_GLES2 (gl_sink->context)) { if (USING_GLES2 (gl_sink->context)) {