diff options
author | C.Even <c.even@live.cn> | 2022-03-29 11:48:49 +0800 |
---|---|---|
committer | C.Even <c.even@live.cn> | 2022-03-29 12:15:36 +0800 |
commit | 619d9d143baff60827249a5592b2117675ae88f1 (patch) | |
tree | adbb6ab467c9340c75d93c474f406bc7b64792e7 /editor | |
parent | c5efda5f4ef983c74068ab39f2eb47292cd7b4e9 (diff) |
Fix Callable::bind usage in connections_dialog.h and packed_scene.cpp
* Callable::bind takes an array of pointers to Variant
* Fixes #57057
Diffstat (limited to 'editor')
-rw-r--r-- | editor/connections_dialog.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/editor/connections_dialog.h b/editor/connections_dialog.h index a075ff0c55..58c584b8b2 100644 --- a/editor/connections_dialog.h +++ b/editor/connections_dialog.h @@ -93,8 +93,11 @@ public: if (unbinds > 0) { return Callable(target, method).unbind(unbinds); } else if (!binds.is_empty()) { - const Variant *args = binds.ptr(); - return Callable(target, method).bind(&args, binds.size()); + const Variant **argptrs = (const Variant **)alloca(sizeof(Variant *) * binds.size()); + for (int i = 0; i < binds.size(); i++) { + argptrs[i] = &binds[i]; + } + return Callable(target, method).bind(argptrs, binds.size()); } else { return Callable(target, method); } |