From 34d4e854bcc3a322c7cf2e9507aac7fed71bdbcf Mon Sep 17 00:00:00 2001 From: Evangelos Ribeiro Tzaras Date: Thu, 16 Mar 2023 11:23:36 +0100 Subject: [PATCH] manager: Respect object life cycle for signal handlers Don't call signal handlers after the manager has been disposed. --- src/calls-manager.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/calls-manager.c b/src/calls-manager.c index 192ae27..e7cbb78 100644 --- a/src/calls-manager.c +++ b/src/calls-manager.c @@ -365,10 +365,11 @@ add_origin (CallsManager *self, CallsOrigin *origin) g_list_store_append (self->origins, origin); - g_signal_connect (origin, - "message", - G_CALLBACK (on_message), - self); + g_signal_connect_object (origin, + "message", + G_CALLBACK (on_message), + self, + G_CONNECT_AFTER); g_signal_connect_object (origin, "notify::country-code",