mirror of
https://projects.blender.org/blender/blender.git
synced 2025-01-22 23:42:16 -05:00
Fix: Crash opening new file after having one open with Subsirf
There is some special code in the Object's freeing which did special checks for SubdivCCG based on the evaluated mesh state. If the depsgraph is destroyed prior to the evaluated object it makes object to access freed components of ID node. The fix makes it so the evaluated ID is freed prior to freeing components.
This commit is contained in:
parent
5a8003091c
commit
bab46b4f02
1 changed files with 4 additions and 4 deletions
|
@ -116,10 +116,6 @@ void IDNode::destroy()
|
|||
return;
|
||||
}
|
||||
|
||||
for (ComponentNode *comp_node : components.values()) {
|
||||
delete comp_node;
|
||||
}
|
||||
|
||||
/* Free memory used by this evaluated ID. */
|
||||
if (!ELEM(id_cow, id_orig, nullptr)) {
|
||||
deg_free_eval_copy_datablock(id_cow);
|
||||
|
@ -129,6 +125,10 @@ void IDNode::destroy()
|
|||
"Destroy evaluated ID for %s: id_orig=%p id_cow=%p\n", id_orig->name, id_orig, id_cow);
|
||||
}
|
||||
|
||||
for (ComponentNode *comp_node : components.values()) {
|
||||
delete comp_node;
|
||||
}
|
||||
|
||||
/* Tag that the node is freed. */
|
||||
id_orig = nullptr;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue