aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/light.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main/light.c')
-rw-r--r--mesalib/src/mesa/main/light.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/light.c b/mesalib/src/mesa/main/light.c
index 7bc22e2fa..38ec1b6e8 100644
--- a/mesalib/src/mesa/main/light.c
+++ b/mesalib/src/mesa/main/light.c
@@ -728,6 +728,8 @@ _mesa_ColorMaterial( GLenum face, GLenum mode )
_mesa_lookup_enum_by_nr(mode));
bitmask = _mesa_material_bitmask(ctx, face, mode, legal, "glColorMaterial");
+ if (bitmask == 0)
+ return; /* error was recorded */
if (ctx->Light.ColorMaterialBitmask == bitmask &&
ctx->Light.ColorMaterialFace == face &&