diff options
author | Jacques Lucke <jacques@blender.org> | 2021-11-09 15:30:15 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-11-09 15:31:01 +0300 |
commit | 45bd98d4cff4ff5889595af8cae5d2d94a7868a1 (patch) | |
tree | 142024b844e5d2977bf1b7ddb640485cc890ae56 /source/blender/blenkernel | |
parent | c56cf50bd0b68ccbdba17fe715278f08a9cef7e9 (diff) |
Fix T92934: crash rendering with wrong image path
These null checks were missing in rB0c3b215e7d5456878b155d13440864f49ad1f230.
Differential Revision: https://developer.blender.org/D13157
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index c9ac1f32804..311199f8833 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -1304,6 +1304,9 @@ void BKE_image_print_memlist(Main *bmain) static bool imagecache_check_dirty(ImBuf *ibuf, void *UNUSED(userkey), void *UNUSED(userdata)) { + if (ibuf == NULL) { + return false; + } return (ibuf->userflags & IB_BITMAPDIRTY) == 0; } @@ -1347,6 +1350,9 @@ void BKE_image_free_all_textures(Main *bmain) static bool imagecache_check_free_anim(ImBuf *ibuf, void *UNUSED(userkey), void *userdata) { + if (ibuf == NULL) { + return true; + } int except_frame = *(int *)userdata; return (ibuf->userflags & IB_BITMAPDIRTY) == 0 && (ibuf->index != IMA_NO_INDEX) && (except_frame != IMA_INDEX_ENTRY(ibuf->index)); |