[Bf-blender-cvs] [d91a144] gooseberry: Fix for corruption of the item hash table in cache libraries on copy.

Lukas Tönne noreply at git.blender.org
Mon Mar 23 13:04:39 CET 2015


Commit: d91a1443055bbbca45813c460a9c7b1522431a3a
Author: Lukas Tönne
Date:   Fri Mar 20 17:50:43 2015 +0100
Branches: gooseberry
https://developer.blender.org/rBd91a1443055bbbca45813c460a9c7b1522431a3a

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