summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFredrik Höglund <[email protected]>2015-05-07 20:28:23 +0200
committerFredrik Höglund <[email protected]>2015-05-14 15:48:12 +0200
commitf9f5c822845698482d0d81eaa64bc13c2fd8852a (patch)
tree493023c0e028a44a36ec2b595e241574358c4173 /src
parent8f78c6889d508d40c82229ea3fa09a78b4ea2e17 (diff)
main: Require that the texture exists in framebuffer_texture
Generate GL_INVALID_OPERATION if the texture hasn't been created. Signed-off-by: Fredrik Höglund <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Cc: "10.4 10.5" <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/fbobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 9486ded05a0..4524e51e4c0 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -2603,7 +2603,7 @@ framebuffer_texture(struct gl_context *ctx, const char *caller, GLenum target,
GLboolean err = GL_TRUE;
texObj = _mesa_lookup_texture(ctx, texture);
- if (texObj != NULL) {
+ if (texObj != NULL && texObj->Target != 0) {
if (textarget == 0) {
if (layered) {
/* We're being called by glFramebufferTexture() and textarget