From 5a29f338f5c4b5eaf252103deb4e69a1bd2f0da5 Mon Sep 17 00:00:00 2001 From: Samuel Rhodes Date: Sun, 25 Jan 2026 18:26:36 -0600 Subject: [PATCH] Fix error in debugger while changing scene on button clicked with touchscreen When changing scenes via button click with a touchscreen, nodes can be removed from the tree during input event processing. The ERR_FAIL_COND_V assertion in can_process() would trigger an error when called on nodes already removed from the tree. Changed to return false instead of asserting, which is the correct behavior for nodes not in the tree. Fixes #115376 --- scene/main/node.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scene/main/node.cpp b/scene/main/node.cpp index 7bb91676cd..4cc0bf7c08 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -907,8 +907,7 @@ bool Node::can_process_notification(int p_what) const { } bool Node::can_process() const { - ERR_FAIL_COND_V(!is_inside_tree(), false); - return !data.tree->is_suspended() && _can_process(data.tree->is_paused()); + return is_inside_tree() && !data.tree->is_suspended() && _can_process(data.tree->is_paused()); } bool Node::_can_process(bool p_paused) const {