diff options
Diffstat (limited to 'scene/resources/packed_scene.cpp')
-rw-r--r-- | scene/resources/packed_scene.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp index 2f1ac7a83a..b1c2702a1e 100644 --- a/scene/resources/packed_scene.cpp +++ b/scene/resources/packed_scene.cpp @@ -34,7 +34,6 @@ #include "core/config/project_settings.h" #include "core/core_string_names.h" #include "core/io/resource_loader.h" -#include "editor/editor_inspector.h" #include "scene/2d/node_2d.h" #include "scene/3d/node_3d.h" #include "scene/gui/control.h" @@ -363,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); |