UPBGE: Fix crash when calling shade_light texture when mtex has no tex.
This commit is contained in:
parent
80837d06de
commit
396a6d8a86
Notes:
blender-bot
2023-02-14 10:21:15 +01:00
Referenced by issue #49484, Bug: Crash when MTex has no tex
|
@ -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