summaryrefslogtreecommitdiff
path: root/src/mesa/main/mipmap.c
diff options
context:
space:
mode:
authorVinson Lee <vlee@vmware.com>2010-02-27 17:19:31 -0800
committerVinson Lee <vlee@vmware.com>2010-02-27 17:19:31 -0800
commitbfdee9cc70f21ef34ca8497d30ab72106ce43bd1 (patch)
treef366fed122412bfd8d674bf9163ce9c17445d591 /src/mesa/main/mipmap.c
parent65974f67e16187e1827fa4e46bde3b5df7a5bf02 (diff)
mesa: Add assert to check input to memcpy is not null.
Diffstat (limited to 'src/mesa/main/mipmap.c')
-rw-r--r--src/mesa/main/mipmap.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c
index 355af56b41..89b8c5a356 100644
--- a/src/mesa/main/mipmap.c
+++ b/src/mesa/main/mipmap.c
@@ -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,