diff options
author | Samuel Pitoiset <[email protected]> | 2017-06-21 10:04:49 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-06-22 10:41:30 +0200 |
commit | 45eb87e5e51a2f52c385d3874f3c9578cd7e3c67 (patch) | |
tree | 7d6733ebfe0fd6bf6cdb6b71fc1ef2f29eaa307d /src/mesa | |
parent | 7f47c31f8cd0a7cc95f152cbc13cc8bec018b0ec (diff) |
mesa: fix using texture id 0 with gl*TextureParameter*()
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/texparam.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index 6c0a5c46d60..3c110de839a 100644 --- a/src/mesa/main/texparam.c +++ b/src/mesa/main/texparam.c @@ -157,11 +157,9 @@ get_texobj_by_name(struct gl_context *ctx, GLuint texture, const char *name) { struct gl_texture_object *texObj; - texObj = _mesa_lookup_texture(ctx, texture); - if (!texObj) { - _mesa_error(ctx, GL_INVALID_OPERATION, "%s(texture)", name); + texObj = _mesa_lookup_texture_err(ctx, texture, name); + if (!texObj) return NULL; - } switch (texObj->Target) { case GL_TEXTURE_1D: |