Signed-off-by: Juha-Pekka Heikkila <[email protected]>
---
 src/mesa/main/fbobject.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 2892784..6b88e7d 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -3024,6 +3024,12 @@ _mesa_GenerateMipmap(GLenum target)
 
    texObj = _mesa_get_current_tex_object(ctx, target);
 
+   if (!texObj) {
+      _mesa_error(ctx, GL_INVALID_OPERATION,
+                  "glGenerateMipmap(current_tex_object=null)");
+      return;
+   }
+
    if (texObj->BaseLevel >= texObj->MaxLevel) {
       /* nothing to do */
       return;
-- 
1.8.1.2

_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to