user-accounts: fix crash when network changes

Add user dialog crashes if it has been closed and network configuration
changes, because the dialog is already disposed, but on_network_changes
callback is executed. To fix this crash network monitor signal handler
has to be disconnected on dispose.

https://bugzilla.gnome.org/show_bug.cgi?id=742439
This commit is contained in:
Ondrej Holy 2015-01-06 09:53:54 +01:00
parent 83d3725819
commit f0e8f9d161

View file

@ -1357,7 +1357,7 @@ enterprise_init (UmAccountDialog *self,
self, NULL);
monitor = g_network_monitor_get_default ();
g_signal_connect (monitor, "network-changed", G_CALLBACK (on_network_changed), self);
g_signal_connect_object (monitor, "network-changed", G_CALLBACK (on_network_changed), self, 0);
}
static void