From f5703a54e2f765237e01eef6ddbd019ca6a58e81 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 18 Aug 2010 17:42:34 -0700 Subject: mesa: Don't try to free components of a NULL uniform list. This might happen if we manage to trigger the right linker errors. --- src/mesa/program/prog_uniform.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mesa') 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); } -- cgit v1.2.3