Backends: OpenGL3: Fix access violation due to NULL from glGetStringi. (#4201)
diff --git a/backends/imgui_impl_opengl3.cpp b/backends/imgui_impl_opengl3.cpp
index 2ff804e..712de9b 100644
--- a/backends/imgui_impl_opengl3.cpp
+++ b/backends/imgui_impl_opengl3.cpp
@@ -247,7 +247,7 @@
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