Merge pull request #38078 from Faymoon/master

This commit is contained in:
Rémi Verschelde 2021-07-13 11:39:20 +02:00 committed by GitHub
commit c7d13f009d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1729,10 +1729,11 @@ void _Thread::_start_func(void *ud) {
memdelete(tud);
Callable::CallError ce;
const Variant *arg[1] = { &t->userdata };
int argc = (int)(arg[0]->get_type() != Variant::NIL);
Thread::set_name(t->target_method);
t->ret = t->target_instance->call(t->target_method, arg, 1, ce);
t->ret = t->target_instance->call(t->target_method, arg, argc, ce);
if (ce.error != Callable::CallError::CALL_OK) {
String reason;
switch (ce.error) {