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 5aa9878d43cf0b5796a97ccf981e9352a3dcd046..28acb8871a722f4c10df46c2229297bbe284e56c 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);
    }