summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorDualMatrix <piet.goris@gmail.com>2018-09-21 00:05:39 +0200
committerDualMatrix <piet.goris@gmail.com>2018-09-21 00:05:39 +0200
commit992a5892f1302dec024c7f603a0ddd2822e3ac83 (patch)
treed899e8fba48b712387592392bec9cb33db25cf38 /core
parent561a7772c628d0cf36bd925d68a98a767758345b (diff)
Fixed method not found error when connecting with signal that fires in editor
Fixed method not found error when connecting with signal that fires in editor. This is a better solution to the problem than #22033. As discussed on IRC This properly fixes #13070 then.
Diffstat (limited to 'core')
-rw-r--r--core/object.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/object.cpp b/core/object.cpp
index 96914fe141..c4577a8137 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 {