diff options
-rw-r--r-- | core/core_bind.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/core_bind.cpp b/core/core_bind.cpp index 242a2f3638..71c04f7954 100644 --- a/core/core_bind.cpp +++ b/core/core_bind.cpp @@ -2221,7 +2221,7 @@ Object *Engine::get_singleton_object(const StringName &p_name) const { void Engine::register_singleton(const StringName &p_name, Object *p_object) { ERR_FAIL_COND_MSG(has_singleton(p_name), "Singleton already registered: " + String(p_name)); - ERR_FAIL_COND_MSG(p_name.operator String().is_valid_identifier(), "Singleton name is not a valid identifier: " + String(p_name)); + ERR_FAIL_COND_MSG(!String(p_name).is_valid_identifier(), "Singleton name is not a valid identifier: " + p_name); ::Engine::Singleton s; s.class_name = p_name; s.name = p_name; |