Commit d114c3a2 authored by Thomas Guillem's avatar Thomas Guillem

opengl: add extra check

(cherry picked from commit 47d454df)
Signed-off-by: Thomas Guillem's avatarThomas Guillem <thomas@gllm.fr>
parent cffa2168
......@@ -836,6 +836,13 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
GL_ASSERT_NOERROR();
const char *extensions = (const char *)vgl->vt.GetString(GL_EXTENSIONS);
assert(extensions);
if (!extensions)
{
msg_Err(gl, "glGetString returned NULL\n");
free(vgl);
return NULL;
}
#if !defined(USE_OPENGL_ES2)
const unsigned char *ogl_version = vgl->vt.GetString(GL_VERSION);
bool supports_shaders = strverscmp((const char *)ogl_version, "2.0") >= 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment