1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2025-01-10 13:55:32 +00:00

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))
This commit is contained in:
Evangelos Ribeiro Tzaras 2023-03-16 11:27:31 +01:00
parent 93ff933569
commit b53d22fced

View file

@ -273,12 +273,16 @@ on_providers_changed (CallsAccountOverview *self)
if (CALLS_IS_ACCOUNT_PROVIDER (provider)) { if (CALLS_IS_ACCOUNT_PROVIDER (provider)) {
self->providers = g_list_append (self->providers, provider); self->providers = g_list_append (self->providers, provider);
g_signal_connect_swapped (calls_provider_get_origins (provider), g_signal_connect_object (calls_provider_get_origins (provider),
"items-changed", "items-changed",
G_CALLBACK (update_account_list), G_CALLBACK (update_account_list),
self); self,
g_signal_connect_swapped (provider, "widget-edit-done", G_CONNECT_SWAPPED);
G_CALLBACK (gtk_widget_hide), self->account_window); g_signal_connect_object (provider,
"widget-edit-done",
G_CALLBACK (gtk_widget_hide),
self->account_window,
G_CONNECT_SWAPPED);
} }
} }