mesa: remove redundant NULL check

This can never be NULL in any of the entry paths.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
This commit is contained in:
Timothy Arceri
2017-06-26 12:38:22 +10:00
parent c7f7a375d9
commit 3034c4c725
+2 -6
View File
@@ -2504,6 +2504,8 @@ copytexsubimage_error_check(struct gl_context *ctx, GLuint dimensions,
GLint xoffset, GLint yoffset, GLint zoffset,
GLint width, GLint height, const char *caller)
{
assert(texObj);
struct gl_texture_image *texImage;
/* Check that the source buffer is complete */
@@ -2530,12 +2532,6 @@ copytexsubimage_error_check(struct gl_context *ctx, GLuint dimensions,
return GL_TRUE;
}
/* Get dest image pointers */
if (!texObj) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "%s()", caller);
return GL_TRUE;
}
texImage = _mesa_select_tex_image(texObj, target, level);
if (!texImage) {
/* destination image does not exist */