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:
Diffstat (limited to 'source/blender/blenkernel/intern/image.c')
-rw-r--r--source/blender/blenkernel/intern/image.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 1e55b5ee962..41b2b1d80a1 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -985,7 +985,11 @@ static bool imagecache_check_free_anim(ImBuf *ibuf, void *UNUSED(userkey), void
/* except_frame is weak, only works for seqs without offset... */
void BKE_image_free_anim_ibufs(Image *ima, int except_frame)
{
- IMB_moviecache_cleanup(ima->cache, imagecache_check_free_anim, &except_frame);
+ BLI_spin_lock(&image_spin);
+ if (ima->cache != NULL) {
+ IMB_moviecache_cleanup(ima->cache, imagecache_check_free_anim, &except_frame);
+ }
+ BLI_spin_unlock(&image_spin);
}
void BKE_image_all_free_anim_ibufs(int cfra)