[Bf-blender-cvs] [3e44712] alembic_pointcache: Fix for corruption of the item hash table in cache libraries on copy.
Lukas Tönne
noreply at git.blender.org
Fri Mar 20 17:51:09 CET 2015
Commit: 3e44712895e021b5040aede67783338c0f700f5d
Author: Lukas Tönne
Date: Fri Mar 20 17:50:43 2015 +0100
Branches: alembic_pointcache
https://developer.blender.org/rB3e44712895e021b5040aede67783338c0f700f5d
Fix for corruption of the item hash table in cache libraries on copy.
===================================================================
M source/blender/blenkernel/intern/cache_library.c
===================================================================
diff --git a/source/blender/blenkernel/intern/cache_library.c b/source/blender/blenkernel/intern/cache_library.c
index 20a6a13..9f2dc03 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);
}
More information about the Bf-blender-cvs
mailing list