[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).
This commit is contained in:
Jens Granseuer 2009-10-23 18:35:47 +02:00
parent 3223742188
commit b5c741ee95

View file

@ -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));