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:
authorLukas Tönne <lukas.toenne@gmail.com>2015-03-20 19:50:43 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2015-03-20 19:50:43 +0300
commit3e44712895e021b5040aede67783338c0f700f5d (patch)
tree4393c99e7167c69759d90dda65c621826fe41807
parentb01037b81d0969b977d136b59572d78c4015e6f4 (diff)
Fix for corruption of the item hash table in cache libraries on copy.
-rw-r--r--source/blender/blenkernel/intern/cache_library.c3
1 files changed, 2 insertions, 1 deletions
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);
}