Missing NULL-pointer check in BKE_image_free_anim_ibufs

This commit is contained in:
2013-12-16 16:30:28 +06:00
parent c05209ec01
commit 17604cded9

View File

@@ -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)