diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-06-13 14:55:54 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-06-13 14:57:22 +0300 |
commit | f2c5ea2516e3912045b4b7d0ecff50e808998efa (patch) | |
tree | 69a8da9d5467522315f0afdb343e658b8c6db9a2 /source/blender | |
parent | 2566652ae6c07f4f7a2edd87dbac500b8dc910bf (diff) |
Fix own error w/ undefined behavior
This happened to work for me but caused issues on OSX.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/library_idmap.c | 6 |
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); |