diff --git a/gst-libs/gst/gl/gstglcontext.c b/gst-libs/gst/gl/gstglcontext.c index 9ef92c8f99..a5843f58fd 100644 --- a/gst-libs/gst/gl/gstglcontext.c +++ b/gst-libs/gst/gl/gstglcontext.c @@ -1063,6 +1063,12 @@ _create_context_info (GstGLContext * context, GstGLAPI gl_api, gint * gl_major, gl = context->gl_vtable; + if (!gl->GetString || !gl->GetString (GL_VERSION)) { + g_set_error (error, GST_GL_CONTEXT_ERROR, GST_GL_CONTEXT_ERROR_FAILED, + "glGetString not defined or returned invalid value"); + return FALSE; + } + GST_INFO ("GL_VERSION: %s", GST_STR_NULL ((const gchar *) gl->GetString (GL_VERSION))); GST_INFO ("GL_SHADING_LANGUAGE_VERSION: %s", GST_STR_NULL ((const gchar *)