Backends: OpenGL3: Fix access violation due to NULL from glGetStringi. (#4201)

docking
Tatsuya Yatagawa 4 years ago committed by GitHub
parent 94b680e830
commit fe24591411
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -247,7 +247,7 @@ bool ImGui_ImplOpenGL3_Init(const char* glsl_version)
for (GLint i = 0; i < num_extensions; i++)
{
const char* extension = (const char*)glGetStringi(GL_EXTENSIONS, i);
if (strcmp(extension, "GL_ARB_clip_control") == 0)
if (extension != NULL && strcmp(extension, "GL_ARB_clip_control") == 0)
g_HasClipOrigin = true;
}
#endif

Loading…
Cancel
Save