From f9452957cd11adc467203fa4d77d4cc2e5312cbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 19 Apr 2018 02:46:40 -0500 Subject: [PATCH 1/2] gtkplacesview: unset entry_pulse_timeout_id before removing it Fixes a warning on widget finalize, when trying to remove an invalid source. --- gtk/gtkplacesview.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gtk/gtkplacesview.c b/gtk/gtkplacesview.c index c4323748ff..d1ce605eb1 100644 --- a/gtk/gtkplacesview.c +++ b/gtk/gtkplacesview.c @@ -1385,6 +1385,7 @@ pulse_entry_cb (gpointer user_data) { gtk_entry_set_progress_pulse_step (GTK_ENTRY (priv->address_entry), 0.0); gtk_entry_set_progress_fraction (GTK_ENTRY (priv->address_entry), 0.0); + priv->entry_pulse_timeout_id = 0; return G_SOURCE_REMOVE; } From 4900c3eb3bae774649b04994c5cfc699f745523a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 19 Apr 2018 02:47:30 -0500 Subject: [PATCH 2/2] gtkplacesview: disconnect from server list monitor changes on destroy It might happen otherwise that a change is recorded in between the widget dispose and finalization, causing a crash when setting the visible name for the GtkStack (as that will be NULL at that point) --- gtk/gtkplacesview.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gtk/gtkplacesview.c b/gtk/gtkplacesview.c index d1ce605eb1..abbf5dd3df 100644 --- a/gtk/gtkplacesview.c +++ b/gtk/gtkplacesview.c @@ -392,6 +392,9 @@ gtk_places_view_destroy (GtkWidget *widget) if (priv->network_monitor) g_signal_handlers_disconnect_by_func (priv->network_monitor, update_places, widget); + if (priv->server_list_monitor) + g_signal_handlers_disconnect_by_func (priv->server_list_monitor, server_file_changed_cb, widget); + g_cancellable_cancel (priv->cancellable); g_cancellable_cancel (priv->networks_fetching_cancellable);