diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-05-09 18:01:42 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-05-09 18:01:42 +0400 |
commit | d326d92b2f2aeb94396ddedc1221681c82e250d9 (patch) | |
tree | 0f538e8bf70dbefa9ca13732412fa33b1bb75fbb /source/blender/render | |
parent | 675f84511674e04de2d2b6f31807392494249da0 (diff) |
fix [#35280] blender crashes when setting Environment Map imagefile
Diffstat (limited to 'source/blender/render')
-rw-r--r-- | source/blender/render/intern/source/imagetexture.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/render/intern/source/imagetexture.c b/source/blender/render/intern/source/imagetexture.c index 65976668502..c87f2df25bc 100644 --- a/source/blender/render/intern/source/imagetexture.c +++ b/source/blender/render/intern/source/imagetexture.c @@ -1109,9 +1109,12 @@ static int imagewraposa_aniso(Tex *tex, Image *ima, ImBuf *ibuf, const float tex /* mipmap test */ image_mipmap_test(tex, ibuf); - if ((tex->imaflag & TEX_USEALPHA) && (ima->flag & IMA_IGNORE_ALPHA) == 0) { - if ((tex->imaflag & TEX_CALCALPHA) == 0) - texres->talpha = 1; + if (ima) { + if ((tex->imaflag & TEX_USEALPHA) && (ima->flag & IMA_IGNORE_ALPHA) == 0) { + if ((tex->imaflag & TEX_CALCALPHA) == 0) { + texres->talpha = 1; + } + } } texr.talpha = texres->talpha; |