diff options
author | Micky <micheledevita2@gmail.com> | 2022-11-12 16:01:17 +0100 |
---|---|---|
committer | Micky <micheledevita2@gmail.com> | 2022-11-13 00:01:18 +0100 |
commit | a1c10dbbd8c390b7d0709c61bc31a2d5636c2941 (patch) | |
tree | 1994c6001ef144e164f6b77a591f8f7425ef59e5 /scene/main | |
parent | c17f17eb98188a7134c85bdbdf0123127c462046 (diff) |
Strip ERR_FAIL from `Node.remove_from_group()`
Also simplifies group check removing unnecessary `!data.grouped.has`
Diffstat (limited to 'scene/main')
-rw-r--r-- | scene/main/node.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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<StringName, GroupData>::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); |