[Bf-blender-cvs] [1301d0b8d38] uuid-id: Forgot to free new id_map uuid ghash in previous commit.
Bastien Montagne
noreply at git.blender.org
Mon Mar 2 16:28:00 CET 2020
Commit: 1301d0b8d381ebb0974fc9075f8201f620a4a7cd
Author: Bastien Montagne
Date: Mon Mar 2 16:27:32 2020 +0100
Branches: uuid-id
https://developer.blender.org/rB1301d0b8d381ebb0974fc9075f8201f620a4a7cd
Forgot to free new id_map uuid ghash in previous commit.
===================================================================
M source/blender/blenkernel/intern/main_idmap.c
===================================================================
diff --git a/source/blender/blenkernel/intern/main_idmap.c b/source/blender/blenkernel/intern/main_idmap.c
index 4563f4ba1c6..2516263d058 100644
--- a/source/blender/blenkernel/intern/main_idmap.c
+++ b/source/blender/blenkernel/intern/main_idmap.c
@@ -224,14 +224,19 @@ ID *BKE_main_idmap_lookup_uuid(struct IDNameLib_Map *id_map, const uint session_
void BKE_main_idmap_destroy(struct IDNameLib_Map *id_map)
{
- struct IDNameLib_TypeMap *type_map = id_map->type_maps;
- for (int i = 0; i < MAX_LIBARRAY; i++, type_map++) {
- if (type_map->map) {
- BLI_ghash_free(type_map->map, NULL, NULL);
- type_map->map = NULL;
- MEM_freeN(type_map->keys);
+ if (id_map->idmap_types & MAIN_IDMAP_TYPE_NAME) {
+ struct IDNameLib_TypeMap *type_map = id_map->type_maps;
+ for (int i = 0; i < MAX_LIBARRAY; i++, type_map++) {
+ if (type_map->map) {
+ BLI_ghash_free(type_map->map, NULL, NULL);
+ type_map->map = NULL;
+ MEM_freeN(type_map->keys);
+ }
}
}
+ if (id_map->idmap_types & MAIN_IDMAP_TYPE_UUID) {
+ BLI_ghash_free(id_map->uuid_map, NULL, NULL);
+ }
if (id_map->valid_id_pointers != NULL) {
BLI_gset_free(id_map->valid_id_pointers, NULL);
More information about the Bf-blender-cvs
mailing list