diff options
author | Jacques Lucke <jacques@blender.org> | 2022-09-16 17:02:08 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2022-09-16 17:03:50 +0300 |
commit | 4d67a995d91f000971312356c14c21559954f63e (patch) | |
tree | 7d70728429faf5ddaf7e45d23164f883e12f72ff /source/blender/depsgraph/intern/node/deg_node_component.cc | |
parent | 7042f4e4b2e3232da34fadfb83502d090809a211 (diff) |
Fix: crash when evaluating geometry nodes after deleting an unlinked node
This was essentially a use-after-free issue. When a geometry nodes
group changes it has to be preprocessed again before it can be evaluated.
This part was working, the issue was that parent node groups have to be
preprocessed as well, which was missing. The lazy-function graph cached
on the parent node group was still referencing data that was freed when
the child group changed.
Now the depsgraph makes sure that all relevant geometry node groups are
preprocessed again after a change.
This issue was found by Simon Thommes.
Diffstat (limited to 'source/blender/depsgraph/intern/node/deg_node_component.cc')
-rw-r--r-- | source/blender/depsgraph/intern/node/deg_node_component.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/node/deg_node_component.cc b/source/blender/depsgraph/intern/node/deg_node_component.cc index f2d82e80fa6..40b4b36a29c 100644 --- a/source/blender/depsgraph/intern/node/deg_node_component.cc +++ b/source/blender/depsgraph/intern/node/deg_node_component.cc @@ -337,6 +337,7 @@ DEG_COMPONENT_NODE_DEFINE(GenericDatablock, GENERIC_DATABLOCK, 0); DEG_COMPONENT_NODE_DEFINE(Visibility, VISIBILITY, 0); DEG_COMPONENT_NODE_DEFINE(Simulation, SIMULATION, 0); DEG_COMPONENT_NODE_DEFINE(NTreeOutput, NTREE_OUTPUT, ID_RECALC_NTREE_OUTPUT); +DEG_COMPONENT_NODE_DEFINE(NTreeGeometryPreprocess, NTREE_GEOMETRY_PREPROCESS, 0); /** \} */ @@ -371,6 +372,7 @@ void deg_register_component_depsnodes() register_node_typeinfo(&DNTI_VISIBILITY); register_node_typeinfo(&DNTI_SIMULATION); register_node_typeinfo(&DNTI_NTREE_OUTPUT); + register_node_typeinfo(&DNTI_NTREE_GEOMETRY_PREPROCESS); } /** \} */ |