mesa: Don't try to free components of a NULL uniform list.
authorEric Anholt <eric@anholt.net>
Thu, 19 Aug 2010 00:42:34 +0000 (17:42 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 19 Aug 2010 00:45:08 +0000 (17:45 -0700)
This might happen if we manage to trigger the right linker errors.

src/mesa/program/prog_uniform.c

index 5aa9878..28acb88 100644 (file)
@@ -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);
    }