projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c7f7a37
)
mesa: remove redundant NULL check
author
Timothy Arceri
<tarceri@itsqueeze.com>
Mon, 26 Jun 2017 02:38:22 +0000
(12:38 +1000)
committer
Timothy Arceri
<tarceri@itsqueeze.com>
Mon, 26 Jun 2017 22:15:09 +0000
(08:15 +1000)
This can never be NULL in any of the entry paths.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/mesa/main/teximage.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/teximage.c
b/src/mesa/main/teximage.c
index 9d39759c3da4140dacf3359155eee17618090ddd..a0397472057ad7e96e156b4e2f8c9f920648991a 100644
(file)
--- 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 */