mirror of
https://bitbucket.org/CPMADevs/cnq3
synced 2024-11-23 04:12:42 +00:00
fixed a NULL pointer dereference crash in RB_CalcDiffuseColor
This commit is contained in:
parent
265cca7eb6
commit
1c6bae1eb7
1 changed files with 4 additions and 0 deletions
|
@ -1044,7 +1044,11 @@ void RB_CalcDiffuseColor( unsigned char *colors )
|
|||
vec3_t lightDir;
|
||||
vec3_t directedLight;
|
||||
int numVertexes;
|
||||
|
||||
ent = backEnd.currentEntity;
|
||||
if (!ent || !tess.numVertexes)
|
||||
return;
|
||||
|
||||
ambientLightInt = ent->ambientLightInt;
|
||||
VectorCopy( ent->ambientLight, ambientLight );
|
||||
VectorCopy( ent->directedLight, directedLight );
|
||||
|
|
Loading…
Reference in a new issue