From: Vinson Lee Date: Mon, 15 Feb 2010 06:58:26 +0000 (-0800) Subject: draw: Add assert to check input of memcpy. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6536cdf1836a302d334f7380d1723e8f0bc396be;p=mesa.git draw: Add assert to check input of memcpy. --- diff --git a/src/gallium/auxiliary/draw/draw_vs.c b/src/gallium/auxiliary/draw/draw_vs.c index 6bdd612e6f4..90858380221 100644 --- a/src/gallium/auxiliary/draw/draw_vs.c +++ b/src/gallium/auxiliary/draw/draw_vs.c @@ -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);