From: Eric Anholt Date: Thu, 19 Aug 2010 00:42:34 +0000 (-0700) Subject: mesa: Don't try to free components of a NULL uniform list. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f5703a54e2f765237e01eef6ddbd019ca6a58e81;p=mesa.git mesa: Don't try to free components of a NULL uniform list. This might happen if we manage to trigger the right linker errors. --- diff --git a/src/mesa/program/prog_uniform.c b/src/mesa/program/prog_uniform.c index 5aa9878d43c..28acb8871a7 100644 --- a/src/mesa/program/prog_uniform.c +++ b/src/mesa/program/prog_uniform.c @@ -44,6 +44,10 @@ void _mesa_free_uniform_list(struct gl_uniform_list *list) { GLuint i; + + if (!list) + return; + for (i = 0; i < list->NumUniforms; i++) { free((void *) list->Uniforms[i].Name); }