diff options
author | Samuel Pitoiset <[email protected]> | 2017-06-21 10:09:47 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-06-22 10:41:15 +0200 |
commit | 8a7ab8d418fc0747612a0f2111c80445219b99ed (patch) | |
tree | f02093e4a5dabb88ca9e6192936300f0129bb43a /src | |
parent | 048de9e34a2214371481143cddcaa53f52468c6b (diff) |
mesa: use _mesa_lookup_texture_err() in get_tex_obj_for_clear()
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/teximage.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 54f7c08d50e..346d505fcaa 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -4143,17 +4143,9 @@ get_tex_obj_for_clear(struct gl_context *ctx, { struct gl_texture_object *texObj; - if (texture == 0) { - _mesa_error(ctx, GL_INVALID_OPERATION, "%s(zero texture)", function); - return NULL; - } - - texObj = _mesa_lookup_texture(ctx, texture); - - if (texObj == NULL) { - _mesa_error(ctx, GL_INVALID_OPERATION, "%s(non-gen name)", function); + texObj = _mesa_lookup_texture_err(ctx, texture, function); + if (!texObj) return NULL; - } if (texObj->Target == 0) { _mesa_error(ctx, GL_INVALID_OPERATION, "%s(unbound tex)", function); |