about_me_destroy() frees the whole data structure and it tries to do the
right thing by setting "me = NULL" afterwards, but "me" in this case is not the global variable, but the local one which shadows it. So the global "me" remains non-NULL and when later about_me_focus_out() is called, it cannot know it should return early. It only makes sense for about_me_destroy() to operate on the global "me", so there's no point in passing it as a parameter.
This commit is contained in:
parent
601c160350
commit
41586c16b9
1 changed files with 4 additions and 4 deletions
|
@ -163,7 +163,7 @@ about_me_error (GtkWindow *parent, gchar *str)
|
||||||
|
|
||||||
/********************/
|
/********************/
|
||||||
static void
|
static void
|
||||||
about_me_destroy (GnomeAboutMe *me)
|
about_me_destroy (void)
|
||||||
{
|
{
|
||||||
e_contact_address_free (me->addr1);
|
e_contact_address_free (me->addr1);
|
||||||
e_contact_address_free (me->addr2);
|
e_contact_address_free (me->addr2);
|
||||||
|
@ -813,7 +813,7 @@ about_me_button_clicked_cb (GtkDialog *dialog, gint response_id, GnomeAboutMe *m
|
||||||
about_me_commit (me);
|
about_me_commit (me);
|
||||||
}
|
}
|
||||||
|
|
||||||
about_me_destroy (me);
|
about_me_destroy ();
|
||||||
gtk_main_quit ();
|
gtk_main_quit ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -855,7 +855,7 @@ about_me_setup_dialog (void)
|
||||||
gtk_container_add (GTK_CONTAINER (WID ("button-image")), me->image_chooser);
|
gtk_container_add (GTK_CONTAINER (WID ("button-image")), me->image_chooser);
|
||||||
|
|
||||||
if (dialog == NULL) {
|
if (dialog == NULL) {
|
||||||
about_me_destroy (me);
|
about_me_destroy ();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -890,7 +890,7 @@ about_me_setup_dialog (void)
|
||||||
about_me_error (NULL, _("There was an error while trying to get the addressbook information\n" \
|
about_me_error (NULL, _("There was an error while trying to get the addressbook information\n" \
|
||||||
"Evolution Data Server can't handle the protocol"));
|
"Evolution Data Server can't handle the protocol"));
|
||||||
g_clear_error (&error);
|
g_clear_error (&error);
|
||||||
about_me_destroy (me);
|
about_me_destroy ();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue