forked from bartvdbraak/blender
UPBGE: Fix crash when calling shade_light texture when mtex has no tex.
This commit is contained in:
parent
80837d06de
commit
396a6d8a86
@ -804,7 +804,7 @@ static void shade_light_textures(GPUMaterial *mat, GPULamp *lamp, GPUNodeLink **
|
||||
for (int i = 0; i < MAX_MTEX; ++i) {
|
||||
MTex *mtex = lamp->la->mtex[i];
|
||||
|
||||
if (mtex && mtex->tex->type & TEX_IMAGE && mtex->tex->ima) {
|
||||
if (mtex && mtex->tex && (mtex->tex->type & TEX_IMAGE) && mtex->tex->ima) {
|
||||
mat->dynproperty |= DYN_LAMP_PERSMAT;
|
||||
|
||||
float one = 1.0f;
|
||||
|
Loading…
Reference in New Issue
Block a user