mirror of
https://github.com/godotengine/godot.git
synced 2024-11-26 22:23:04 +00:00
Fix inversed check inside register_singleton
This commit is contained in:
parent
30cf49e8d0
commit
dbb37e586b
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user