mesa: Add assert to check input to memcpy is not null.
authorVinson Lee <vlee@vmware.com>
Sun, 28 Feb 2010 01:19:31 +0000 (17:19 -0800)
committerVinson Lee <vlee@vmware.com>
Sun, 28 Feb 2010 01:19:31 +0000 (17:19 -0800)
src/mesa/main/mipmap.c

index 355af56b41126ba5c7b1e764f2f744a5a4b64067..89b8c5a3563d24102c7cc89290a7cf3a089cc254 100644 (file)
@@ -979,6 +979,7 @@ make_1d_mipmap(GLenum datatype, GLuint comps, GLint border,
 
    if (border) {
       /* copy left-most pixel from source */
+      assert(srcPtr);
       memcpy(dstPtr, srcPtr, bpt);
       /* copy right-most pixel from source */
       memcpy(dstPtr + (dstWidth - 1) * bpt,