We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 48f361a commit 6e65016Copy full SHA for 6e65016
scene/main/node.cpp
@@ -2391,7 +2391,7 @@ bool Node::is_in_group(const StringName &p_identifier) const {
2391
2392
void Node::add_to_group(const StringName &p_identifier, bool p_persistent) {
2393
ERR_THREAD_GUARD
2394
- ERR_FAIL_COND(!p_identifier.operator String().length());
+ ERR_FAIL_COND_MSG(p_identifier.is_empty(), vformat("Cannot add node '%s' to a group with an empty name.", get_name()));
2395
2396
if (data.grouped.has(p_identifier)) {
2397
return;
0 commit comments