Module: Mesa Branch: master Commit: f5703a54e2f765237e01eef6ddbd019ca6a58e81 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f5703a54e2f765237e01eef6ddbd019ca6a58e81
Author: Eric Anholt <e...@anholt.net> Date: Wed Aug 18 17:42:34 2010 -0700 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 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/mesa/program/prog_uniform.c b/src/mesa/program/prog_uniform.c index 5aa9878..28acb88 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); } _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit