Draw Manager: Fix memory issues when copying scene

This commit is contained in:
Dalai Felinto 2017-06-12 16:12:33 +02:00
parent 8ca497b911
commit 109447d008
Notes: blender-bot 2023-02-14 06:53:24 +01:00
Referenced by issue #51780, If an object is in two collections and I do a full copy of scene things go bad
1 changed files with 1 additions and 0 deletions

View File

@ -325,6 +325,7 @@ Scene *BKE_scene_copy(Main *bmain, Scene *sce, int type)
* instead of syncing both trees we simply unlink and relink the scene collection */
BLI_listbase_clear(&new_sl->layer_collections);
BLI_listbase_clear(&new_sl->object_bases);
BLI_listbase_clear(&new_sl->drawdata);
layer_collections_recreate(new_sl, &sl->layer_collections, mcn, mc);