mesa: Add assert to check input to memcpy is not null.

This commit is contained in:
Vinson Lee 2010-02-27 17:19:31 -08:00
parent 65974f67e1
commit bfdee9cc70
1 changed files with 1 additions and 0 deletions

View 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,