changeset 29197:9bf6fe097c9c

Make sure all globals are NULL when the prefs page is destroyed.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Wed, 23 Dec 2009 01:51:19 +0000
parents aec354f08f7c
children f56b7177553d
files pidgin/gtkprefs.c
diffstat 1 files changed, 17 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkprefs.c	Wed Dec 23 01:37:07 2009 +0000
+++ b/pidgin/gtkprefs.c	Wed Dec 23 01:51:19 2009 +0000
@@ -74,7 +74,7 @@
 static GtkWidget *prefs = NULL;
 
 /* Notebook */
-static GtkWidget *prefsnotebook;
+static GtkWidget *prefsnotebook = NULL;
 static int notebook_page = 0;
 
 /* Themes page */
@@ -336,9 +336,24 @@
 	/* Unregister callbacks. */
 	purple_prefs_disconnect_by_handle(prefs);
 
-	prefs = NULL;
+	/* NULL-ify globals */
 	sound_entry = NULL;
+	sound_row_sel = 0;
+	prefs_sound_themes_loading = FALSE;
+
+	prefs_sound_themes = NULL;
+	prefs_blist_themes = NULL;
+	prefs_status_icon_themes = NULL;
+	prefs_smiley_themes = NULL;
+
+	prefs_sound_themes_combo_box = NULL;
+	prefs_blist_themes_combo_box = NULL;
+	prefs_status_themes_combo_box = NULL;
+	prefs_smiley_themes_combo_box = NULL;
+
 	notebook_page = 0;
+	prefsnotebook = NULL;
+	prefs = NULL;
 }
 
 static gchar *