diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-12-16 14:30:28 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-12-16 14:30:28 +0400 |
commit | 17604cded975dcd765141cd1ca93c23d40b33484 (patch) | |
tree | 7a81368b2f8d43e20d3222d0f697835bd5d1362b /source | |
parent | c05209ec017c2aad97d83f36ca2b10eb4b5aee18 (diff) |
Missing NULL-pointer check in BKE_image_free_anim_ibufs
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 6 |
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) |