diff --git a/core/object/object.cpp b/core/object/object.cpp index 10bd258b707..5f091201a75 100644 --- a/core/object/object.cpp +++ b/core/object/object.cpp @@ -1362,14 +1362,18 @@ Error Object::emit_signalp(const StringName &p_name, const Variant **p_args, int _emitting = false; if (ce.error != Callable::CallError::CALL_OK) { + Object *target = callable.get_object(); #ifdef DEBUG_ENABLED - if (flags & CONNECT_PERSIST && Engine::get_singleton()->is_editor_hint() && (!script_instance || !script_instance->get_script()->is_tool())) { - continue; + if (target && flags & CONNECT_PERSIST && Engine::get_singleton()->is_editor_hint()) { + Ref