From 3e44712895e021b5040aede67783338c0f700f5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20T=C3=B6nne?= Date: Fri, 20 Mar 2015 17:50:43 +0100 Subject: Fix for corruption of the item hash table in cache libraries on copy. --- source/blender/blenkernel/intern/cache_library.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/blender/blenkernel/intern/cache_library.c b/source/blender/blenkernel/intern/cache_library.c index 20a6a13f7bc..9f2dc03543b 100644 --- a/source/blender/blenkernel/intern/cache_library.c +++ b/source/blender/blenkernel/intern/cache_library.c @@ -81,6 +81,8 @@ CacheLibrary *BKE_cache_library_copy(CacheLibrary *cachelib) cachelibn = BKE_libblock_copy(&cachelib->id); BLI_duplicatelist(&cachelibn->items, &cachelib->items); + /* hash table will be rebuilt when needed */ + cachelibn->items_hash = NULL; if (cachelib->id.lib) { BKE_id_lib_local_paths(G.main, cachelib->id.lib, &cachelibn->id); @@ -92,7 +94,6 @@ CacheLibrary *BKE_cache_library_copy(CacheLibrary *cachelib) void BKE_cache_library_free(CacheLibrary *cachelib) { BLI_freelistN(&cachelib->items); - if (cachelib->items_hash) BLI_ghash_free(cachelib->items_hash, NULL, NULL); } -- cgit v1.2.3