diff options
author | Brian Paul <[email protected]> | 2012-05-08 10:22:20 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-05-11 16:13:14 -0600 |
commit | f2724905469bbcde820b9ece2e4f44a610a75a65 (patch) | |
tree | 91fd76fc7b4df97dfc5b03355e451f7163bca9e9 /src/mesa | |
parent | bcfc97dbf40c256ed59c2424e0c55b845f0f2569 (diff) |
mesa: fix/add error check in _mesa_ColorMaterial()
_mesa_material_bitmask() will record a GL error and return 0 if
face or mode are illegal. Return early in that case.
NOTE: This is a candidate for the 8.0 branch.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/light.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c index 7bc22e2fa54..38ec1b6e801 100644 --- a/src/mesa/main/light.c +++ b/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 && |