From f2c5ea2516e3912045b4b7d0ecff50e808998efa Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 13 Jun 2016 21:55:54 +1000 Subject: Fix own error w/ undefined behavior This happened to work for me but caused issues on OSX. --- source/blender/blenkernel/intern/library_idmap.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/blender/blenkernel') 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); -- cgit v1.2.3