[gnome-control-center] [about-me] Fix crash when closing the window using the window button



commit b5c741ee95c346d298d21d4cab8d9717d2335c4d
Author: Jens Granseuer <jensgr gmx net>
Date:   Fri Oct 23 18:35:47 2009 +0200

    [about-me] Fix crash when closing the window using the window button
    
    Make sure the focus-out handler doesn't try to take action after the
    application resources have already been destroyed (bug #592348).

 capplets/about-me/gnome-about-me.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/capplets/about-me/gnome-about-me.c b/capplets/about-me/gnome-about-me.c
index af5c579..9551917 100644
--- a/capplets/about-me/gnome-about-me.c
+++ b/capplets/about-me/gnome-about-me.c
@@ -184,6 +184,7 @@ about_me_destroy (GnomeAboutMe *me)
 	g_free (me->login);
 	g_free (me->username);
 	g_free (me);
+	me = NULL;
 }
 
 static void
@@ -269,12 +270,15 @@ about_me_commit_from_timeout (GnomeAboutMe *me)
 }
 
 static gboolean
-about_me_focus_out (GtkWidget *widget, GdkEventFocus *event, GnomeAboutMe *me)
+about_me_focus_out (GtkWidget *widget, GdkEventFocus *event, GnomeAboutMe *unused)
 {
 	gchar *str;
 	const gchar *wid;
 	gint i;
 
+	if (me == NULL)
+		return FALSE;
+
 	wid = gtk_widget_get_name (widget);
 
 	if (wid == NULL)
@@ -787,7 +791,7 @@ about_me_icon_theme_changed (GtkWindow    *window,
 
 	icon = gtk_icon_theme_lookup_icon (me->theme, "stock_person", 80, 0);
 	if (icon == NULL) {
-		g_print ("Icon not found\n");
+		g_debug ("Icon not found");
 	}
 	g_free (me->person);
 	me->person = g_strdup (gtk_icon_info_get_filename (icon));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]