From a2624f2d2eb41c859a8754d81c262aab6b21dd22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=B6glund?= 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" (cherry picked from commit f9f5c822845698482d0d81eaa64bc13c2fd8852a) --- 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 79390abf8f9..bbf8aed3aaf 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -2387,7 +2387,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.1