From b53d22fcedeb402ddd070a2a4fca10295be88984 Mon Sep 17 00:00:00 2001 From: Evangelos Ribeiro Tzaras Date: Thu, 16 Mar 2023 11:27:31 +0100 Subject: [PATCH] account-overview: Respect object life cycle for signal handlers Prevents the following failed assertion when shutting down Calls: CallsAccountOverview:ERROR:../src/calls-account-overview.c:222:update_account_list: assertion failed: (CALLS_IS_ACCOUNT_OVERVIEW (self)) --- src/calls-account-overview.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/calls-account-overview.c b/src/calls-account-overview.c index 88d33c1..96d783b 100644 --- a/src/calls-account-overview.c +++ b/src/calls-account-overview.c @@ -273,12 +273,16 @@ on_providers_changed (CallsAccountOverview *self) if (CALLS_IS_ACCOUNT_PROVIDER (provider)) { self->providers = g_list_append (self->providers, provider); - g_signal_connect_swapped (calls_provider_get_origins (provider), - "items-changed", - G_CALLBACK (update_account_list), - self); - g_signal_connect_swapped (provider, "widget-edit-done", - G_CALLBACK (gtk_widget_hide), self->account_window); + g_signal_connect_object (calls_provider_get_origins (provider), + "items-changed", + G_CALLBACK (update_account_list), + self, + G_CONNECT_SWAPPED); + g_signal_connect_object (provider, + "widget-edit-done", + G_CALLBACK (gtk_widget_hide), + self->account_window, + G_CONNECT_SWAPPED); } }