From f9f5c822845698482d0d81eaa64bc13c2fd8852a Mon Sep 17 00:00:00 2001 From: Fredrik Höglund Date: Thu, 7 May 2015 20:28:23 +0200 Subject: main: Require that the texture exists in framebuffer_texture MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Generate GL_INVALID_OPERATION if the texture hasn't been created. Signed-off-by: Fredrik Höglund Reviewed-by: Adam Jackson Cc: "10.4 10.5" --- src/mesa/main/fbobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 -- cgit v1.2.3