From 0599592bb723aff75e747e1a9f897cc518bd496d Mon Sep 17 00:00:00 2001 From: Hans Petter Jansson Date: Tue, 27 Jan 2004 21:47:15 +0000 Subject: Handle NULL name. Fixes #53071. 2004-01-27 Hans Petter Jansson * gui/contact-editor/e-contact-editor-fullname.c (e_contact_editor_fullname_set_property): Handle NULL name. Fixes #53071. svn path=/trunk/; revision=24479 --- addressbook/ChangeLog | 6 ++++++ addressbook/gui/contact-editor/e-contact-editor-fullname.c | 11 +++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 76646095e1..800fcac28b 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,9 @@ +2004-01-27 Hans Petter Jansson + + * gui/contact-editor/e-contact-editor-fullname.c + (e_contact_editor_fullname_set_property): Handle NULL name. Fixes + #53071. + 2004-01-27 Chris Toshok * gui/component/addressbook-config.c (dialog_to_source): set the diff --git a/addressbook/gui/contact-editor/e-contact-editor-fullname.c b/addressbook/gui/contact-editor/e-contact-editor-fullname.c index c37f4cc8b7..824a4e45a9 100644 --- a/addressbook/gui/contact-editor/e-contact-editor-fullname.c +++ b/addressbook/gui/contact-editor/e-contact-editor-fullname.c @@ -154,6 +154,7 @@ GtkWidget* e_contact_editor_fullname_new (const EContactName *name) { GtkWidget *widget = g_object_new (E_TYPE_CONTACT_EDITOR_FULLNAME, NULL); + g_object_set (widget, "name", name, NULL); @@ -171,8 +172,14 @@ e_contact_editor_fullname_set_property (GObject *object, guint prop_id, switch (prop_id){ case PROP_NAME: e_contact_name_free(e_contact_editor_fullname->name); - e_contact_editor_fullname->name = e_contact_name_copy(g_value_get_pointer (value)); - fill_in_info(e_contact_editor_fullname); + + if (g_value_get_pointer (value) != NULL) { + e_contact_editor_fullname->name = e_contact_name_copy(g_value_get_pointer (value)); + fill_in_info(e_contact_editor_fullname); + } + else { + e_contact_editor_fullname->name = NULL; + } break; case PROP_EDITABLE: { int i; -- cgit v1.2.3