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:
authorJeroen Bakker <jeroen@blender.org>2022-01-31 14:25:18 +0300
committerJeroen Bakker <jeroen@blender.org>2022-01-31 14:25:18 +0300
commitdeb90557ea20ddbb276a6ed01d8ffdd5e1eee35d (patch)
tree88a4a7f1a6a63504f04c0039fcab2ff19d395292 /source/blender/imbuf
parent869180548c9066009c7f22e98ae717e78a571129 (diff)
Fix T95332: Crash loading older files.
Image buffer was visible but buffer wasn't available. In the case the color only overlay of the render result was displayed the image buffer was not check to be valid. This patch adds a null pointer check to check in `IMB_alpha_affects_rgb` to solve this crash.
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r--source/blender/imbuf/intern/divers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/imbuf/intern/divers.c b/source/blender/imbuf/intern/divers.c
index ff86fbfdd38..f23748e59a2 100644
--- a/source/blender/imbuf/intern/divers.c
+++ b/source/blender/imbuf/intern/divers.c
@@ -104,7 +104,7 @@ MINLINE void float_to_byte_dither_v4(
bool IMB_alpha_affects_rgb(const ImBuf *ibuf)
{
- return (ibuf->flags & IB_alphamode_channel_packed) == 0;
+ return ibuf && (ibuf->flags & IB_alphamode_channel_packed) == 0;
}
void IMB_buffer_byte_from_float(uchar *rect_to,