[network-manager-applet] applet: don't crash if the wireless dialog goes away quickly (rh #542617)
- From: Dan Williams <dcbw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [network-manager-applet] applet: don't crash if the wireless dialog goes away quickly (rh #542617)
- Date: Mon, 30 Nov 2009 18:45:49 +0000 (UTC)
commit e532a25fe3d885d6a4597f3c15423ef3b04e8c8d
Author: Dan Williams <dcbw redhat com>
Date: Mon Nov 30 10:45:22 2009 -0800
applet: don't crash if the wireless dialog goes away quickly (rh #542617)
src/wireless-dialog.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/wireless-dialog.c b/src/wireless-dialog.c
index b42e0f8..0569048 100644
--- a/src/wireless-dialog.c
+++ b/src/wireless-dialog.c
@@ -72,6 +72,8 @@ typedef struct {
gboolean auth_only;
+ guint revalidate_id;
+
gboolean disposed;
} NMAWirelessDialogPrivate;
@@ -1002,6 +1004,7 @@ revalidate (gpointer user_data)
NMAWirelessDialog *self = NMA_WIRELESS_DIALOG (user_data);
NMAWirelessDialogPrivate *priv = NMA_WIRELESS_DIALOG_GET_PRIVATE (self);
+ priv->revalidate_id = 0;
security_combo_changed (priv->sec_combo, self);
return FALSE;
}
@@ -1152,7 +1155,7 @@ internal_init (NMAWirelessDialog *self,
/* Re-validate from an idle handler so that widgets like file choosers
* have had time to find their files.
*/
- g_idle_add (revalidate, self);
+ priv->revalidate_id = g_idle_add (revalidate, self);
return TRUE;
}
@@ -1387,6 +1390,9 @@ dispose (GObject *object)
if (priv->ap)
g_object_unref (priv->ap);
+ if (priv->revalidate_id)
+ g_source_remove (priv->revalidate_id);
+
G_OBJECT_CLASS (nma_wireless_dialog_parent_class)->dispose (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]