aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/contact-editor
diff options
context:
space:
mode:
authorHans Petter Jansson <hpj@ximian.com>2004-01-28 05:47:15 +0800
committerHans Petter <hansp@src.gnome.org>2004-01-28 05:47:15 +0800
commit0599592bb723aff75e747e1a9f897cc518bd496d (patch)
tree7a8ee1662252ed8f03c24fc9ade0944f3b05b92c /addressbook/gui/contact-editor
parenteb4fecb99453dc64a4339c9589f33a56adeb20d8 (diff)
downloadgsoc2013-evolution-0599592bb723aff75e747e1a9f897cc518bd496d.tar
gsoc2013-evolution-0599592bb723aff75e747e1a9f897cc518bd496d.tar.gz
gsoc2013-evolution-0599592bb723aff75e747e1a9f897cc518bd496d.tar.bz2
gsoc2013-evolution-0599592bb723aff75e747e1a9f897cc518bd496d.tar.lz
gsoc2013-evolution-0599592bb723aff75e747e1a9f897cc518bd496d.tar.xz
gsoc2013-evolution-0599592bb723aff75e747e1a9f897cc518bd496d.tar.zst
gsoc2013-evolution-0599592bb723aff75e747e1a9f897cc518bd496d.zip
Handle NULL name. Fixes #53071.
2004-01-27 Hans Petter Jansson <hpj@ximian.com> * gui/contact-editor/e-contact-editor-fullname.c (e_contact_editor_fullname_set_property): Handle NULL name. Fixes #53071. svn path=/trunk/; revision=24479
Diffstat (limited to 'addressbook/gui/contact-editor')
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor-fullname.c11
1 files changed, 9 insertions, 2 deletions
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;