GDScript: Fix small mistake in script valid checks

This commit is contained in:
boywaste 2024-08-25 00:25:10 -07:00
parent 568589c9d8
commit 7014c5b27d

View File

@ -136,7 +136,7 @@ void GDScript::_super_implicit_constructor(GDScript *p_script, GDScriptInstance
} }
} }
ERR_FAIL_NULL(p_script->implicit_initializer); ERR_FAIL_NULL(p_script->implicit_initializer);
if (likely(valid)) { if (likely(p_script->valid)) {
p_script->implicit_initializer->call(p_instance, nullptr, 0, r_error); p_script->implicit_initializer->call(p_instance, nullptr, 0, r_error);
} else { } else {
r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;