summaryrefslogtreecommitdiff
path: root/core/core_bind.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-07-13 11:39:20 +0200
committerGitHub <noreply@github.com>2021-07-13 11:39:20 +0200
commitc7d13f009d4524ac900d11343a622407e70501ba (patch)
tree95908586d81664ca831cda5a8afae7bf3070e718 /core/core_bind.cpp
parenta37155153308e0e529532d5e6e1a1e6158f2c3a8 (diff)
parent78ead60372c3342b15767265c0b0c976658ebc35 (diff)
Merge pull request #38078 from Faymoon/master
Diffstat (limited to 'core/core_bind.cpp')
-rw-r--r--core/core_bind.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/core_bind.cpp b/core/core_bind.cpp
index a3349444c4..9a58528bd7 100644
--- a/core/core_bind.cpp
+++ b/core/core_bind.cpp
@@ -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) {