summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/rastpos.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2001-07-05 15:31:21 +0000
committerBrian Paul <[email protected]>2001-07-05 15:31:21 +0000
commitac541734146071e279a8c379bce98f40195069e5 (patch)
treee9e16a5cbf2e1528c90e18fdf435398dec3d2b2b /src/mesa/main/rastpos.c
parent5233ca8d3061e9e126c73073dccf56c65869bb61 (diff)
fixed segfault (NULL _ShineTable[0]) in shade_rastpos()
Diffstat (limited to 'src/mesa/main/rastpos.c')
-rw-r--r--src/mesa/main/rastpos.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/main/rastpos.c b/src/mesa/main/rastpos.c
index 348cfa7c0a8..83f84683141 100644
--- a/src/mesa/main/rastpos.c
+++ b/src/mesa/main/rastpos.c
@@ -1,4 +1,4 @@
-/* $Id: rastpos.c,v 1.28 2001/06/26 21:15:36 brianp Exp $ */
+/* $Id: rastpos.c,v 1.29 2001/07/05 15:31:21 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -131,6 +131,9 @@ shade_rastpos(GLcontext *ctx,
GLfloat diffuseColor[4], specularColor[4];
GLfloat diffuse = 0, specular = 0;
+ if (!ctx->_ShineTable[0] || !ctx->_ShineTable[1])
+ _mesa_validate_all_lighting_tables( ctx );
+
COPY_3V(diffuseColor, base[0]);
diffuseColor[3] = sumA[0];
ASSIGN_4V(specularColor, 0.0, 0.0, 0.0, 0.0);