mesa: fix error handling for glTexEnv
authorYuanhan Liu <yuanhan.liu@linux.intel.com>
Mon, 19 Sep 2011 07:03:00 +0000 (15:03 +0800)
committerBrian Paul <brianp@vmware.com>
Mon, 19 Sep 2011 14:11:51 +0000 (08:11 -0600)
Fix error handling while calling glTexEnv with invalid texture
environment parameters.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
src/mesa/main/texenv.c

index c0d0f3779b2b07851294d5e739e37659836e86dd..1df3890d47180757037d358300036fbaddc9089e 100644 (file)
@@ -731,7 +731,8 @@ get_texenvi(struct gl_context *ctx, const struct gl_texture_unit *texUnit,
       break;
 
    default:
-      ;
+      _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
+      break;
    }
 
    return -1; /* error */