From f9f5c822845698482d0d81eaa64bc13c2fd8852a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fredrik=20H=C3=B6glund?= Date: Thu, 7 May 2015 20:28:23 +0200 Subject: [PATCH] main: Require that the texture exists in framebuffer_texture MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 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(-) diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 9486ded..4524e51 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 -- 2.7.4