aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog9
-rw-r--r--addressbook/backend/ebook/e-card.c6
2 files changed, 12 insertions, 3 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 8d49925287..325a934e6c 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,12 @@
+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)
+
2001-10-16 JP Rosevear <jpr@ximian.com>
* conduit/address-conduit.c (local_record_from_ecard): don't set
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) {