Merge pull request #56485 from KoBeWi/your_method_is_invalid

This commit is contained in:
Rémi Verschelde 2022-01-04 16:46:13 +01:00 committed by GitHub
commit 1a7619830a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2701,7 +2701,7 @@ void _Thread::_start_func(void *ud) {
Error _Thread::start(Object *p_instance, const StringName &p_method, const Variant &p_userdata, Priority p_priority) {
ERR_FAIL_COND_V_MSG(is_active(), ERR_ALREADY_IN_USE, "Thread already started.");
ERR_FAIL_COND_V(!p_instance, ERR_INVALID_PARAMETER);
ERR_FAIL_COND_V(p_method == StringName(), ERR_INVALID_PARAMETER);
ERR_FAIL_COND_V(p_method == StringName() || !p_instance->has_method(p_method), ERR_INVALID_PARAMETER);
ERR_FAIL_INDEX_V(p_priority, PRIORITY_MAX, ERR_INVALID_PARAMETER);
ret = Variant();