diff options
author | Jon Trowbridge <trow@ximian.com> | 2001-10-17 05:27:59 +0800 |
---|---|---|
committer | Jon Trowbridge <trow@src.gnome.org> | 2001-10-17 05:27:59 +0800 |
commit | 66da172519ba60805e7b07f194ce6a147fcdb905 (patch) | |
tree | 06052595cf27772d52f0013c42ba162a24e61b77 /addressbook/backend/ebook | |
parent | 1ff31661d88adcc062630f760535146f2281209d (diff) | |
download | gsoc2013-evolution-66da172519ba60805e7b07f194ce6a147fcdb905.tar.gz gsoc2013-evolution-66da172519ba60805e7b07f194ce6a147fcdb905.tar.zst gsoc2013-evolution-66da172519ba60805e7b07f194ce6a147fcdb905.zip |
If card->id is NULL, return an empty string. (e_card_set_id): Don't allow
2001-10-16 Jon Trowbridge <trow@ximian.com>
* backend/ebook/e-card.c (e_card_get_id): If card->id is NULL,
return an empty string.
(e_card_set_id): Don't allow the card id to be set to NULL; use
the empty string instead.
(e_card_get_vobject): When building our vcard, pass in the empty
string as the id if card->id is NULL. (Bug #10164)
svn path=/trunk/; revision=13705
Diffstat (limited to 'addressbook/backend/ebook')
-rw-r--r-- | addressbook/backend/ebook/e-card.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/addressbook/backend/ebook/e-card.c b/addressbook/backend/ebook/e-card.c index 38116891b5..47dfdb2880 100644 --- a/addressbook/backend/ebook/e-card.c +++ b/addressbook/backend/ebook/e-card.c @@ -326,7 +326,7 @@ e_card_get_id (ECard *card) { g_return_val_if_fail (card && E_IS_CARD (card), NULL); - return card->id; + return card->id ? card->id : ""; } /** @@ -344,7 +344,7 @@ e_card_set_id (ECard *card, const char *id) if ( card->id ) g_free(card->id); - card->id = g_strdup(id); + card->id = g_strdup(id ? id : ""); } EBook * @@ -729,7 +729,7 @@ e_card_get_vobject (ECard *card, gboolean assumeUTF8) } } - ADD_PROP_VALUE (vobj, VCUniqueStringProp, card->id); + ADD_PROP_VALUE (vobj, VCUniqueStringProp, card->id ? card->id : ""); #if 0 if (crd->photo.prop.used) { |