diff options
author | Matthias Clasen <mclasen@redhat.com> | 2015-07-08 14:39:34 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2015-07-15 15:43:36 -0400 |
commit | 50bdf9de5cba4c4e1a08952f2af1161df10a0e34 (patch) | |
tree | 0f0e602ef7de34f55bf0b0e2d0d190facb747970 | |
parent | 1c7bb6beb0dc262a3a379523dbe23611a4a96b48 (diff) | |
download | gnome-initial-setup-50bdf9de5cba4c4e1a08952f2af1161df10a0e34.tar.gz |
network: Avoid a crash on locale change
We were not careful enough in managing our timeout. Sometimes,
an old timeout could stick around, and then access disposed
objects later on, leading to crash.
https://bugzilla.gnome.org/show_bug.cgi?id=752134
-rw-r--r-- | gnome-initial-setup/pages/network/gis-network-page.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gnome-initial-setup/pages/network/gis-network-page.c b/gnome-initial-setup/pages/network/gis-network-page.c index ddd1c87..c1440c3 100644 --- a/gnome-initial-setup/pages/network/gis-network-page.c +++ b/gnome-initial-setup/pages/network/gis-network-page.c @@ -324,10 +324,8 @@ refresh_again (gpointer user_data) GisNetworkPage *page = GIS_NETWORK_PAGE (user_data); GisNetworkPagePrivate *priv = gis_network_page_get_instance_private (page); - priv->refresh_timeout_id = 0; - refresh_wireless_list (page); - return FALSE; + return G_SOURCE_REMOVE; } static void @@ -345,6 +343,12 @@ refresh_wireless_list (GisNetworkPage *page) g_assert (NM_IS_DEVICE_WIFI (priv->nm_device)); + if (priv->refresh_timeout_id != 0) + { + g_source_remove (priv->refresh_timeout_id); + priv->refresh_timeout_id = 0; + } + active_ap = nm_device_wifi_get_active_access_point (NM_DEVICE_WIFI (priv->nm_device)); children = gtk_container_get_children (GTK_CONTAINER (priv->network_list)); |