diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-12-26 18:31:45 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-12-26 18:31:48 +0300 |
commit | bd80ace2da72256801ca7579ca92cf4fe7a6a513 (patch) | |
tree | 9aa1285bb5db88e3b61e71891509b2b08d2c124d /source/blender/blenloader | |
parent | fe1e2c2f89b54302b213621f6ffd2b6089016155 (diff) |
Depsgraph: Fix copy-on-write assert when freeing Freestyle config
We were bumping user count when duplicating viewlayer and its freestyleconfig
depending on the flag, however when freeing we were always decreasing user
count.
This fixes this and get rid of the assert when running:
`--factory-startup --enable-copy-on-write`
And closing Blender.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index b864c75c90f..31d3b48aee0 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -352,7 +352,7 @@ void do_versions_after_linking_280(Main *main) view_layer->pass_xor = srl->pass_xor; view_layer->pass_alpha_threshold = srl->pass_alpha_threshold; - BKE_freestyle_config_free(&view_layer->freestyle_config); + BKE_freestyle_config_free(&view_layer->freestyle_config, true); view_layer->freestyle_config = srl->freestyleConfig; view_layer->id_properties = srl->prop; @@ -425,7 +425,7 @@ void do_versions_after_linking_280(Main *main) IDP_FreeProperty(srl->prop); MEM_freeN(srl->prop); } - BKE_freestyle_config_free(&srl->freestyleConfig); + BKE_freestyle_config_free(&srl->freestyleConfig, true); } } BLI_freelistN(&scene->r.layers); @@ -540,7 +540,7 @@ void do_versions_after_linking_280(Main *main) IDP_FreeProperty(srl->prop); MEM_freeN(srl->prop); } - BKE_freestyle_config_free(&srl->freestyleConfig); + BKE_freestyle_config_free(&srl->freestyleConfig, true); } BLI_freelistN(&scene->r.layers); } |