Fix T56717: crash removing/adding objects.

Object bases hash always needs to be freed on library remapping.
This commit is contained in:
Brecht Van Lommel
2018-09-10 16:06:58 +02:00
parent b2865560a8
commit d483dfd03d
2 changed files with 5 additions and 7 deletions

View File

@@ -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);
}
}

View File

@@ -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)