summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/teximage.c
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-06-26 12:38:22 +1000
committerTimothy Arceri <[email protected]>2017-06-27 08:15:09 +1000
commit3034c4c7251bca68e68fbc1e71ec5ee7c7ae0d30 (patch)
treeaf8a287e71ab56bbef2624557fff11d9541d7f69 /src/mesa/main/teximage.c
parentc7f7a375d90166fcb765cb4c008a07b083b853ff (diff)
mesa: remove redundant NULL check
This can never be NULL in any of the entry paths. Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r--src/mesa/main/teximage.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 9d39759c3da..a0397472057 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -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 */