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:
authorCampbell Barton <ideasman42@gmail.com>2012-09-05 05:42:52 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-09-05 05:42:52 +0400
commita4b71f4e01227d1d6508d8a5cb02301c19523469 (patch)
tree6b4ccc25835d3ae48a1ebf924be14db2ab5eefd1 /source/blender/imbuf/intern/moviecache.c
parent65b214ed04c65dd4f5f7169a8c5c9e06405b5033 (diff)
fix for various redundant checks and possibly fix some crashes in rare situations.
Diffstat (limited to 'source/blender/imbuf/intern/moviecache.c')
-rw-r--r--source/blender/imbuf/intern/moviecache.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/imbuf/intern/moviecache.c b/source/blender/imbuf/intern/moviecache.c
index 71eae6c6c21..f91f648bb7b 100644
--- a/source/blender/imbuf/intern/moviecache.c
+++ b/source/blender/imbuf/intern/moviecache.c
@@ -172,12 +172,13 @@ static int compare_int(const void *av, const void *bv)
static void IMB_moviecache_destructor(void *p)
{
- MovieCacheItem *item = (MovieCacheItem *) p;
- MovieCache *cache = item->cache_owner;
-
- PRINT("%s: cache '%s' destroy item %p buffer %p\n", __func__, cache->name, item, item->ibuf);
+ MovieCacheItem *item = (MovieCacheItem *)p;
if (item && item->ibuf) {
+ MovieCache *cache = item->cache_owner;
+
+ PRINT("%s: cache '%s' destroy item %p buffer %p\n", __func__, cache->name, item, item->ibuf);
+
IMB_freeImBuf(item->ibuf);
item->ibuf = NULL;