diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/extensions.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index 553c01e343b..43f0e8dd0cc 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -609,6 +609,15 @@ _mesa_one_time_init_extension_overrides(void) /* Copy env_const because strtok() is destructive. */ env = strdup(env_const); + + if (env == NULL || extra_extensions == NULL || + cant_disable_extensions == NULL) { + free(env); + free(extra_extensions); + free(cant_disable_extensions); + return; + } + for (ext = strtok(env, " "); ext != NULL; ext = strtok(NULL, " ")) { int enable; bool recognized; |