From: Fredrik Höglund Date: Thu, 7 May 2015 18:28:23 +0000 (+0200) Subject: main: Require that the texture exists in framebuffer_texture X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f9f5c822845698482d0d81eaa64bc13c2fd8852a;p=mesa.git 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 Reviewed-by: Adam Jackson Cc: "10.4 10.5" --- 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