From: Samuel Pitoiset Date: Wed, 21 Jun 2017 08:11:49 +0000 (+0200) Subject: mesa: fix using texture id 0 with glTextureSubImage*() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a285caaf25e5d69bebd484fdf8019afe116cedde;p=mesa.git mesa: fix using texture id 0 with glTextureSubImage*() Signed-off-by: Samuel Pitoiset Reviewed-by: Timothy Arceri --- diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 346d505fcaa..69ad88237a0 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -3336,12 +3336,9 @@ texturesubimage(struct gl_context *ctx, GLuint dims, _mesa_enum_to_string(type), pixels); /* Get the texture object by Name. */ - texObj = _mesa_lookup_texture(ctx, texture); - if (!texObj) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glTextureSubImage%uD(texture)", - dims); + texObj = _mesa_lookup_texture_err(ctx, texture, callerName); + if (!texObj) return; - } /* check target (proxies not allowed) */ if (!legal_texsubimage_target(ctx, dims, texObj->Target, true)) {