From 13d1ee6058c9e3423e6e8b1f07f388b12e26c7f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 23 Aug 2022 10:38:36 +0200 Subject: [PATCH] Fix VisualScript editor crash when deleting selected nodes Fixes #64662. Regression from #61145. --- modules/visual_script/visual_script_editor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp index afa67c7190f..29f65c431f1 100644 --- a/modules/visual_script/visual_script_editor.cpp +++ b/modules/visual_script/visual_script_editor.cpp @@ -1888,7 +1888,7 @@ void VisualScriptEditor::_on_nodes_delete(const Array &p_nodes) { } } } else { - for (int i = 0; i < graph->get_child_count(); i++) { + for (int i = 0; i < p_nodes.size(); i++) { to_erase.push_back(p_nodes[i].operator String().to_int()); } }