mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-26 05:27:01 +00:00
Backends: OpenGL3: Fix access violation due to NULL from glGetStringi. (#4201)
This commit is contained in:
parent
94b680e830
commit
fe24591411
@ -247,7 +247,7 @@ bool ImGui_ImplOpenGL3_Init(const char* glsl_version)
|
|||||||
for (GLint i = 0; i < num_extensions; i++)
|
for (GLint i = 0; i < num_extensions; i++)
|
||||||
{
|
{
|
||||||
const char* extension = (const char*)glGetStringi(GL_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;
|
g_HasClipOrigin = true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user