summaryrefslogtreecommitdiffstats
path: root/scene
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2022-03-30 09:00:07 +0200
committerGitHub <noreply@github.com>2022-03-30 09:00:07 +0200
commitf6ef63635f92c0a8c9c637c488f0ec129217fade (patch)
tree742460b66a06af55941583b929c749845fa6c00b /scene
parenta06b94a1c19dc4a64a826cd69c66e17134a5f101 (diff)
parent619d9d143baff60827249a5592b2117675ae88f1 (diff)
downloadredot-engine-f6ef63635f92c0a8c9c637c488f0ec129217fade.tar.gz
Merge pull request #59659 from fountainment/fix_callable_bind_usage
Fix Callable::bind usage in connections_dialog.h and packed_scene.cpp
Diffstat (limited to 'scene')
-rw-r--r--scene/resources/packed_scene.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp
index a3e356feaf..b1c2702a1e 100644
--- a/scene/resources/packed_scene.cpp
+++ b/scene/resources/packed_scene.cpp
@@ -362,8 +362,11 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const {
}
}
- const Variant *args = binds.ptr();
- callable = callable.bind(&args, binds.size());
+ const Variant **argptrs = (const Variant **)alloca(sizeof(Variant *) * binds.size());
+ for (int j = 0; j < binds.size(); j++) {
+ argptrs[j] = &binds[j];
+ }
+ callable = callable.bind(argptrs, binds.size());
}
cfrom->connect(snames[c.signal], callable, varray(), CONNECT_PERSIST | c.flags);