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)
This commit is contained in:
Marco Trevisan (Treviño) 2018-04-19 02:47:30 -05:00
parent f9452957cd
commit 4900c3eb3b

View File

@ -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);