summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFredrik Höglund <fredrik@kde.org>2015-05-07 20:28:23 +0200
committerEmil Velikov <emil.l.velikov@gmail.com>2015-05-20 22:08:47 +0100
commita2624f2d2eb41c859a8754d81c262aab6b21dd22 (patch)
tree02f55a68a96a8759debaee7c47bfbe9e9ff562f8
parenta6e1495aa7a980308833ddf078d2c4af113a807b (diff)
downloadmesa-a2624f2d2eb41c859a8754d81c262aab6b21dd22.tar.gz
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 <fredrik@kde.org> Reviewed-by: Adam Jackson <ajax@redhat.com> Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org> (cherry picked from commit f9f5c822845698482d0d81eaa64bc13c2fd8852a)
-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 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