From b32408c607097da2bd96fb473cff2fcb10766557 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Andr=C3=A9=20Vadla=20Ravn=C3=A5s?= Date: Sun, 24 Nov 2024 15:32:58 +0100 Subject: [PATCH] device: Fix the constructor logic Broken by the refactoring in 2790745. --- src/frida.vala | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/frida.vala b/src/frida.vala index 02d1a19b9..6568612fc 100644 --- a/src/frida.vala +++ b/src/frida.vala @@ -547,20 +547,24 @@ namespace Frida { internal Device (DeviceManager? mgr, HostSessionProvider prov, string? id = null, string? name = null, HostSessionOptions? options = null) { - Object (icon: provider.icon); + Object (icon: prov.icon); _id = id; _name = name; - provider = prov; manager = mgr; host_session_options = options; + + assign_provider (prov); } construct { + _bus = new Bus (this); + } + + private void assign_provider (HostSessionProvider prov) { + provider = prov; provider.host_session_detached.connect (on_host_session_detached); provider.agent_session_detached.connect (on_agent_session_detached); - - _bus = new Bus (this); } public bool is_lost () {