Fix crash when making static override of an object from a collection.

Since we free collection caches when we remap one of their objects, we
also need to tell depsgraph to flush this into the COWs of that
collection, otherwise things like draw code can access freed memory...
This commit is contained in:
Bastien Montagne 2018-06-18 18:40:54 +02:00
parent e92d61797b
commit 4efe8fc806
1 changed files with 1 additions and 0 deletions

View File

@ -759,6 +759,7 @@ void BKE_main_collection_sync_remap(const Main *bmain)
for (Collection *collection = bmain->collection.first; collection; collection = collection->id.next) {
BKE_collection_object_cache_free(collection);
DEG_id_tag_update_ex((Main *)bmain, &collection->id, DEG_TAG_COPY_ON_WRITE);
}
BKE_main_collection_sync(bmain);