draw: Add assert to check input of memcpy.
authorVinson Lee <vlee@vmware.com>
Mon, 15 Feb 2010 06:58:26 +0000 (22:58 -0800)
committerVinson Lee <vlee@vmware.com>
Mon, 15 Feb 2010 06:58:26 +0000 (22:58 -0800)
src/gallium/auxiliary/draw/draw_vs.c

index 6bdd612e6f436cbdfd88f93c26883780ed588d1c..90858380221624fc3e14f5b4302d754ed749437a 100644 (file)
@@ -61,6 +61,7 @@ draw_vs_set_constants(struct draw_context *draw,
          }
          draw->vs.aligned_constant_storage[slot] = align_malloc(size, 16);
       }
+      assert(constants);
       memcpy((void *)draw->vs.aligned_constant_storage[slot],
              constants,
              size);