[Mesa-stable] [PATCH 07/57] main: Require that the texture exists in framebuffer_texture

Fredrik Höglund fredrik at kde.org
Mon May 11 10:27:04 PDT 2015


Generate GL_INVALID_OPERATION if the texture hasn't been created.

Cc: "10.4 10.5" <mesa-stable at lists.freedesktop.org>
Signed-off-by: Fredrik Höglund <fredrik at kde.org>
---
 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.1.4



More information about the mesa-stable mailing list