diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2018-10-02 09:38:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-02 09:38:57 +0200 |
commit | 8cabd31577ebe6567bbcc8138367ca4a7c1eb7f0 (patch) | |
tree | 9b1675033fbdabf8cafe862c8fda354a1252fad4 /core/object.cpp | |
parent | 7aca38e218a8d483e8ad81b6d5e7f23b00ce64f4 (diff) | |
parent | 992a5892f1302dec024c7f603a0ddd2822e3ac83 (diff) | |
download | redot-engine-8cabd31577ebe6567bbcc8138367ca4a7c1eb7f0.tar.gz |
Merge pull request #22297 from DualMatrix/no_more_method_not_found_error
Fixed method not found error when connecting with signal that fires in editor
Diffstat (limited to 'core/object.cpp')
-rw-r--r-- | core/object.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/object.cpp b/core/object.cpp index 345c018e6d..946040ba34 100644 --- a/core/object.cpp +++ b/core/object.cpp @@ -1254,7 +1254,10 @@ Error Object::emit_signal(const StringName &p_name, const Variant **p_args, int target->call(c.method, args, argc, ce); if (ce.error != Variant::CallError::CALL_OK) { - +#ifdef DEBUG_ENABLED + if (c.flags & CONNECT_PERSIST && Engine::get_singleton()->is_editor_hint() && (script.is_null() || !Ref<Script>(script)->is_tool())) + continue; +#endif if (ce.error == Variant::CallError::CALL_ERROR_INVALID_METHOD && !ClassDB::class_exists(target->get_class_name())) { //most likely object is not initialized yet, do not throw error. } else { |