Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-05-22 10:22:28 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-05-22 10:22:28 +0400
commitb1d7205aa9cadd0d29941fbb5891095a1fffdbda (patch)
tree0965499360b4fc2a8b4463e64f971eee49f5c27a /source/blender/render
parent4c0e50011e77e05628be805932eb213e5bb4f209 (diff)
Fix #35458: SIGSEGV ( crash ) in imagewraposa()
Was missing a NULL-check.
Diffstat (limited to 'source/blender/render')
-rw-r--r--source/blender/render/intern/source/imagetexture.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/source/blender/render/intern/source/imagetexture.c b/source/blender/render/intern/source/imagetexture.c
index c87f2df25bc..c5e4f97c6bc 100644
--- a/source/blender/render/intern/source/imagetexture.c
+++ b/source/blender/render/intern/source/imagetexture.c
@@ -224,9 +224,11 @@ int imagewrap(Tex *tex, Image *ima, ImBuf *ibuf, const float texvec[3], TexResul
}
/* keep this before interpolation [#29761] */
- if ((tex->imaflag & TEX_USEALPHA) && (ima->flag & IMA_IGNORE_ALPHA) == 0) {
- if ((tex->imaflag & TEX_CALCALPHA) == 0) {
- texres->talpha = TRUE;
+ if (ima) {
+ if ((tex->imaflag & TEX_USEALPHA) && (ima->flag & IMA_IGNORE_ALPHA) == 0) {
+ if ((tex->imaflag & TEX_CALCALPHA) == 0) {
+ texres->talpha = TRUE;
+ }
}
}
@@ -1529,9 +1531,11 @@ int imagewraposa(Tex *tex, Image *ima, ImBuf *ibuf, const float texvec[3], const
/* 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 = TRUE;
+ if (ima) {
+ if ((tex->imaflag & TEX_USEALPHA) && (ima->flag & IMA_IGNORE_ALPHA) == 0) {
+ if ((tex->imaflag & TEX_CALCALPHA) == 0) {
+ texres->talpha = TRUE;
+ }
}
}