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:
authorCampbell Barton <ideasman42@gmail.com>2016-06-13 14:55:54 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-06-13 14:57:22 +0300
commitf2c5ea2516e3912045b4b7d0ecff50e808998efa (patch)
tree69a8da9d5467522315f0afdb343e658b8c6db9a2 /source/blender/blenkernel
parent2566652ae6c07f4f7a2edd87dbac500b8dc910bf (diff)
Fix own error w/ undefined behavior
This happened to work for me but caused issues on OSX.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/library_idmap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/library_idmap.c b/source/blender/blenkernel/intern/library_idmap.c
index fd78d9b23ce..66025c04332 100644
--- a/source/blender/blenkernel/intern/library_idmap.c
+++ b/source/blender/blenkernel/intern/library_idmap.c
@@ -88,8 +88,10 @@ struct IDNameLib_Map *BKE_main_idmap_create(struct Main *bmain)
int index = 0;
while (index < MAX_LIBARRAY) {
- id_map->type_maps[index].map = NULL;
- id_map->type_maps[index].id_type = BKE_idcode_iter_step(&index);
+ struct IDNameLib_TypeMap *type_map = &id_map->type_maps[index];
+ type_map->map = NULL;
+ type_map->id_type = BKE_idcode_iter_step(&index);
+ BLI_assert(type_map->id_type != 0);
}
BLI_assert(index == MAX_LIBARRAY);