mirror of
https://github.com/godotengine/godot.git
synced 2024-11-23 04:33:29 +00:00
Merge pull request #68564 from Mickeon/node-no-remove-group-error
Strip ERR_FAIL from `Node.remove_from_group()`
This commit is contained in:
commit
0dbb632116
@ -606,7 +606,7 @@
|
||||
<return type="void" />
|
||||
<param index="0" name="group" type="StringName" />
|
||||
<description>
|
||||
Removes a node from a group. See notes in the description, and the group methods in [SceneTree].
|
||||
Removes a node from the [param group]. Does nothing if the node is not in the [param group]. See notes in the description, and the group methods in [SceneTree].
|
||||
</description>
|
||||
</method>
|
||||
<method name="replace_by">
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user