summaryrefslogtreecommitdiff
path: root/scene/main
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-11-14 23:24:14 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-11-14 23:24:14 +0100
commit0dbb632116fb934902939ce66bfac0d71a980dd8 (patch)
tree381f4437f55147c7a22ee85f9b85b0c9803f4fec /scene/main
parent80dbcfd9958bf6cc1d348f9a35ec671cb434a741 (diff)
parenta1c10dbbd8c390b7d0709c61bc31a2d5636c2941 (diff)
Merge pull request #68564 from Mickeon/node-no-remove-group-error
Strip ERR_FAIL from `Node.remove_from_group()`
Diffstat (limited to 'scene/main')
-rw-r--r--scene/main/node.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index 473f69a172..377620af64 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);