OSDN Git Service

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 355af56..89b8c5a 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,