mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Fix Callable::bind usage in connections_dialog.h and packed_scene.cpp
* Callable::bind takes an array of pointers to Variant * Fixes #57057
This commit is contained in:
parent
c5efda5f4e
commit
619d9d143b
2 changed files with 10 additions and 4 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue