Generate GL_INVALID_OPERATION if the texture hasn't been created.
Cc: "10.4 10.5" <[email protected]>
Signed-off-by: Fredrik Höglund <[email protected]>
---
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
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev