mirror of https://github.com/mpv-player/mpv
vo_opengl: don't pass (char*)NULL as %s printf argument
glGetString(GL_SHADING_LANGUAGE_VERSION) can return NULL; I suppose this happens on legacy OpenGL, while all the other fields are guaranteed to exist.
This commit is contained in:
parent
2c99464b47
commit
a95cfac078
|
@ -497,8 +497,9 @@ void mpgl_load_functions(GL *gl, void *(*getProcAddress)(const GLubyte *),
|
||||||
mp_verbose(log, "GL_VENDOR='%s'\n", gl->GetString(GL_VENDOR));
|
mp_verbose(log, "GL_VENDOR='%s'\n", gl->GetString(GL_VENDOR));
|
||||||
mp_verbose(log, "GL_RENDERER='%s'\n", gl->GetString(GL_RENDERER));
|
mp_verbose(log, "GL_RENDERER='%s'\n", gl->GetString(GL_RENDERER));
|
||||||
mp_verbose(log, "GL_VERSION='%s'\n", gl->GetString(GL_VERSION));
|
mp_verbose(log, "GL_VERSION='%s'\n", gl->GetString(GL_VERSION));
|
||||||
mp_verbose(log, "GL_SHADING_LANGUAGE_VERSION='%s'\n",
|
const char *shader = gl->GetString(GL_SHADING_LANGUAGE_VERSION);
|
||||||
gl->GetString(GL_SHADING_LANGUAGE_VERSION));
|
if (shader)
|
||||||
|
mp_verbose(log, "GL_SHADING_LANGUAGE_VERSION='%s'\n", shader);
|
||||||
|
|
||||||
// Note: This code doesn't handle CONTEXT_FORWARD_COMPATIBLE_BIT_ARB
|
// Note: This code doesn't handle CONTEXT_FORWARD_COMPATIBLE_BIT_ARB
|
||||||
// on OpenGL 3.0 correctly. Apparently there's no way to detect this
|
// on OpenGL 3.0 correctly. Apparently there's no way to detect this
|
||||||
|
|
Loading…
Reference in New Issue