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:
parent
e92d61797b
commit
4efe8fc806
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue