diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-09-10 17:06:58 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-09-10 17:09:52 +0300 |
commit | d483dfd03db1afd660fd4d9d082694d9587d4e0b (patch) | |
tree | 147d50fb1d062d609a00281fa380100dbc636802 /source/blender/blenkernel | |
parent | b2865560a89ea8ff6a96395ab8e2d00317d5d16d (diff) |
Fix T56717: crash removing/adding objects.
Object bases hash always needs to be freed on library remapping.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/collection.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/library_remap.c | 10 |
2 files changed, 5 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c index 1f6ab06fb49..75f721b79e6 100644 --- a/source/blender/blenkernel/intern/collection.c +++ b/source/blender/blenkernel/intern/collection.c @@ -673,7 +673,7 @@ void BKE_collections_child_remove_nulls(Main *bmain, Collection *old_collection) } if (changed) { - BKE_main_collection_sync(bmain); + BKE_main_collection_sync_remap(bmain); } } diff --git a/source/blender/blenkernel/intern/library_remap.c b/source/blender/blenkernel/intern/library_remap.c index fc2e4cd4723..6ebcf399b3f 100644 --- a/source/blender/blenkernel/intern/library_remap.c +++ b/source/blender/blenkernel/intern/library_remap.c @@ -299,9 +299,8 @@ static void libblock_remap_data_postprocess_object_update(Main *bmain, Object *o * to remove the NULL children from collections not used in any scene. */ BKE_collections_object_remove_nulls(bmain); } - else { - BKE_main_collection_sync_remap(bmain); - } + + BKE_main_collection_sync_remap(bmain); if (old_ob->type == OB_MBALL) { for (Object *ob = bmain->object.first; ob; ob = ob->id.next) { @@ -320,9 +319,8 @@ static void libblock_remap_data_postprocess_collection_update(Main *bmain, Colle * because of pointer replacement. */ BKE_collections_child_remove_nulls(bmain, old_collection); } - else { - BKE_main_collection_sync_remap(bmain); - } + + BKE_main_collection_sync_remap(bmain); } static void libblock_remap_data_postprocess_obdata_relink(Main *bmain, Object *ob, ID *new_id) |