[gtk: 2/3] gtkplacesview: disconnect from server list monitor changes on destroy
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk: 2/3] gtkplacesview: disconnect from server list monitor changes on destroy
- Date: Thu, 19 Apr 2018 08:26:29 +0000 (UTC)
commit 4900c3eb3bae774649b04994c5cfc699f745523a
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Thu Apr 19 02:47:30 2018 -0500
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]