mirror of
https://bitbucket.org/CPMADevs/cnq3
synced 2024-11-10 06:31:48 +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 lightDir;
|
||||||
vec3_t directedLight;
|
vec3_t directedLight;
|
||||||
int numVertexes;
|
int numVertexes;
|
||||||
|
|
||||||
ent = backEnd.currentEntity;
|
ent = backEnd.currentEntity;
|
||||||
|
if (!ent || !tess.numVertexes)
|
||||||
|
return;
|
||||||
|
|
||||||
ambientLightInt = ent->ambientLightInt;
|
ambientLightInt = ent->ambientLightInt;
|
||||||
VectorCopy( ent->ambientLight, ambientLight );
|
VectorCopy( ent->ambientLight, ambientLight );
|
||||||
VectorCopy( ent->directedLight, directedLight );
|
VectorCopy( ent->directedLight, directedLight );
|
||||||
|
|
Loading…
Reference in a new issue