diff options
author | Ulysse Martin <you.le@live.fr> | 2016-09-30 08:40:17 +0300 |
---|---|---|
committer | Porteries Tristan <republicthunderbolt9@gmail.com> | 2016-09-30 08:41:18 +0300 |
commit | 396a6d8a86f265c5fbb437b498b708a2f687a6f2 (patch) | |
tree | 80841e08629a5f12f12541b397163b3008408b8f /source/blender/gpu | |
parent | 80837d06decac612ec5dac68eca033292fcb4762 (diff) |
UPBGE: Fix crash when calling shade_light texture when mtex has no tex.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/intern/gpu_material.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c index ed9718f1a17..b857aea29ad 100644 --- a/source/blender/gpu/intern/gpu_material.c +++ b/source/blender/gpu/intern/gpu_material.c @@ -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; |