Unverified Commit 6a7b5580 by Rémi Verschelde Committed by GitHub

Merge pull request #39041 from swarnimarun/patch-1

Fix crashing of VisualScript due to function change
parents f66eed7d 5c486315
......@@ -3216,6 +3216,7 @@ void VisualScriptEditor::_move_nodes_with_rescan(const StringName &p_func_from,
{
List<VisualScript::DataConnection> data_connections;
script->get_data_connection_list(p_func_from, &data_connections);
int func_from_node_id = script->get_function_node_id(p_func_from);
HashMap<int, Map<int, Pair<int, int>>> connections;
......@@ -3225,6 +3226,11 @@ void VisualScriptEditor::_move_nodes_with_rescan(const StringName &p_func_from,
int out_p = E->get().from_port;
int in_p = E->get().to_port;
// skip if the from_node is a function node
if (from == func_from_node_id) {
continue;
}
if (!connections.has(to)) {
connections.set(to, Map<int, Pair<int, int>>());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment