summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>2017-04-11 16:46:14 -0300
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>2017-04-11 16:50:33 -0300
commit400db31ad3466c2839ea6cc6d193db8023225247 (patch)
tree429a7d60eee2182251131eac5a9e02ce9c9a5538
parent767927aef309761754ce9da8062e20521761b6e0 (diff)
downloadgtk+-400db31ad3466c2839ea6cc6d193db8023225247.tar.gz
placesview: fix testsuite
Because the network monitor can perfectly be NULL, the tests were failing on that for GtkPlacesView always tries to disconnect this handler. Fix that by only disconnecting the handler when the network monitor exists. https://bugzilla.gnome.org/show_bug.cgi?id=781195
-rw-r--r--gtk/gtkplacesview.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gtk/gtkplacesview.c b/gtk/gtkplacesview.c
index 12b556873c..12c81b03eb 100644
--- a/gtk/gtkplacesview.c
+++ b/gtk/gtkplacesview.c
@@ -398,7 +398,9 @@ gtk_places_view_destroy (GtkWidget *widget)
priv->destroyed = 1;
g_signal_handlers_disconnect_by_func (priv->volume_monitor, update_places, widget);
- g_signal_handlers_disconnect_by_func (priv->network_monitor, update_places, widget);
+
+ if (priv->network_monitor)
+ g_signal_handlers_disconnect_by_func (priv->network_monitor, update_places, widget);
g_cancellable_cancel (priv->cancellable);
g_cancellable_cancel (priv->networks_fetching_cancellable);