From b9edd2e02e4ed3ef13000f73c8d014a719f5d9c0 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Fri, 5 Jul 2024 19:35:03 +0200 Subject: [PATCH] Fix #124216: "Remove Hook" operator causes crash with geometry nodes It looks like the "user edited flag propagation" node built for the geometry nodes modifier is unchanged after modifiers are removed. My guess is this is now a more general problem when modifiers are removed-- I guess the depsgraph nodes for an object have to be rebuilt when that happens now. Maybe there is a more general fix, but to fix the crash mentioned in the report, I tagged the depsgraph for a relations update, which rebuilds the problematic modifier node. Pull Request: https://projects.blender.org/blender/blender/pulls/124252 --- source/blender/editors/object/object_hook.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/source/blender/editors/object/object_hook.cc b/source/blender/editors/object/object_hook.cc index da73887d45a..7f05a818506 100644 --- a/source/blender/editors/object/object_hook.cc +++ b/source/blender/editors/object/object_hook.cc @@ -719,6 +719,7 @@ static int object_hook_remove_exec(bContext *C, wmOperator *op) BKE_modifier_remove_from_list(ob, (ModifierData *)hmd); BKE_modifier_free((ModifierData *)hmd); + DEG_relations_tag_update(CTX_data_main(C)); DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob);