diff options
author | Christopher James Lahey <clahey@ximian.com> | 2001-03-29 07:49:48 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2001-03-29 07:49:48 +0800 |
commit | d6e6a8d2cc1dcd1ec1aab907a3f7723e0a675b71 (patch) | |
tree | fecb5cf342d3185b5ae1ea14732f1396fae4e921 /addressbook/backend/ebook | |
parent | 954405749b2bf50cb17a3410b40aa8d24aec271d (diff) | |
download | gsoc2013-evolution-d6e6a8d2cc1dcd1ec1aab907a3f7723e0a675b71.tar gsoc2013-evolution-d6e6a8d2cc1dcd1ec1aab907a3f7723e0a675b71.tar.gz gsoc2013-evolution-d6e6a8d2cc1dcd1ec1aab907a3f7723e0a675b71.tar.bz2 gsoc2013-evolution-d6e6a8d2cc1dcd1ec1aab907a3f7723e0a675b71.tar.lz gsoc2013-evolution-d6e6a8d2cc1dcd1ec1aab907a3f7723e0a675b71.tar.xz gsoc2013-evolution-d6e6a8d2cc1dcd1ec1aab907a3f7723e0a675b71.tar.zst gsoc2013-evolution-d6e6a8d2cc1dcd1ec1aab907a3f7723e0a675b71.zip |
Fixed some crashes.
2001-03-28 Christopher James Lahey <clahey@ximian.com>
* backend/ebook/e-card.c (e_card_set_arg): Fixed some crashes.
svn path=/trunk/; revision=9001
Diffstat (limited to 'addressbook/backend/ebook')
-rw-r--r-- | addressbook/backend/ebook/e-card.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/addressbook/backend/ebook/e-card.c b/addressbook/backend/ebook/e-card.c index 8c1f7b1905..8729652c6d 100644 --- a/addressbook/backend/ebook/e-card.c +++ b/addressbook/backend/ebook/e-card.c @@ -204,6 +204,12 @@ e_card_new (char *vcard) cleanVObject(vobj); vobj = next; } + if (card->name == NULL) + card->name = e_card_name_new(); + if (card->file_as == NULL) + card->file_as = g_strdup(""); + if (card->fname == NULL) + card->fname = g_strdup(""); return card; } @@ -265,6 +271,8 @@ char if ( card->fname ) addPropValue(vobj, VCFullNameProp, card->fname); + else if (card->fname) + addProp(vobj, VCFullNameProp); if ( card->name && (card->name->prefix || card->name->given || card->name->additional || card->name->family || card->name->suffix) ) { VObject *nameprop; @@ -280,6 +288,8 @@ char if ( card->name->suffix ) addPropValue(nameprop, VCNameSuffixesProp, card->name->suffix); } + else if (card->name) + addProp(vobj, VCNameProp); if ( card->address ) { @@ -1638,12 +1648,16 @@ e_card_set_arg (GtkObject *object, GtkArg *arg, guint arg_id) case ARG_FILE_AS: g_free(card->file_as); card->file_as = g_strdup(GTK_VALUE_STRING(*arg)); + if (card->file_as == NULL) + card->file_as = g_strdup(""); break; case ARG_FULL_NAME: g_free(card->fname); card->fname = g_strdup(GTK_VALUE_STRING(*arg)); if (card->name) e_card_name_free (card->name); + if (card->fname == NULL) + card->fname = g_strdup(""); card->name = e_card_name_from_string (card->fname); break; case ARG_NAME: |