From a1c10dbbd8c390b7d0709c61bc31a2d5636c2941 Mon Sep 17 00:00:00 2001 From: Micky Date: Sat, 12 Nov 2022 16:01:17 +0100 Subject: Strip ERR_FAIL from `Node.remove_from_group()` Also simplifies group check removing unnecessary `!data.grouped.has` --- scene/main/node.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scene/main') diff --git a/scene/main/node.cpp b/scene/main/node.cpp index 304504a82e..a16bf543d8 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -1759,11 +1759,11 @@ void Node::add_to_group(const StringName &p_identifier, bool p_persistent) { } void Node::remove_from_group(const StringName &p_identifier) { - ERR_FAIL_COND(!data.grouped.has(p_identifier)); - HashMap::Iterator E = data.grouped.find(p_identifier); - ERR_FAIL_COND(!E); + if (!E) { + return; + } if (data.tree) { data.tree->remove_from_group(E->key, this); -- cgit v1.2.3