cogl: Fix broken check for COGL_DISABLE_GL_EXTENSION envvar

This check was always true since the variable is already set in the
if() condition above. Presumably this was meant to check for empty
strings, so do that.

CID: #1491518
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2061>
This commit is contained in:
Carlos Garnacho 2021-10-24 20:54:17 +02:00
parent 8ede36b2ef
commit 774f120ac4

View File

@ -363,13 +363,17 @@ _cogl_context_get_gl_extensions (CoglContext *context)
char **split_env_disabled_extensions;
char **src, **dst;
if (env_disabled_extensions)
split_env_disabled_extensions =
g_strsplit (env_disabled_extensions,
",",
0 /* no max tokens */);
if (*env_disabled_extensions)
{
split_env_disabled_extensions =
g_strsplit (env_disabled_extensions,
",",
0 /* no max tokens */);
}
else
split_env_disabled_extensions = NULL;
{
split_env_disabled_extensions = NULL;
}
for (dst = ret, src = ret;
*src;