diff options
-rw-r--r-- | addressbook/ChangeLog | 5 | ||||
-rw-r--r-- | addressbook/conduit/address-conduit.c | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index ea645f990a..c32db78c6e 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,8 @@ +2004-06-03 Jeffrey Stedfast <fejj@novell.com> + + * conduit/address-conduit.c (set_status_cleared): Protect against + a NULL uid. Fixes bug #57619. + 2004-06-02 Hans Petter Jansson <hpj@ximian.com> * gui/component/addressbook-migrate.c diff --git a/addressbook/conduit/address-conduit.c b/addressbook/conduit/address-conduit.c index 555e470fda..9e29167590 100644 --- a/addressbook/conduit/address-conduit.c +++ b/addressbook/conduit/address-conduit.c @@ -473,7 +473,7 @@ next_changed_item (EAddrConduitContext *ctxt, GList *changes) EBookChange *ebc; GList *l; - for (l = changes; l != NULL; l = l->next) { + for (l = changes; l != NULL; l = l->next) { ebc = l->data; if (g_hash_table_lookup (ctxt->changed_hash, e_contact_get_const (ebc->contact, E_CONTACT_UID))) @@ -1283,9 +1283,12 @@ set_status_cleared (GnomePilotConduitSyncAbs *conduit, EAddrLocalRecord *local, EAddrConduitContext *ctxt) { + const char *uid; + LOG (g_message ( "set_status_cleared: clearing status\n" )); - g_hash_table_remove (ctxt->changed_hash, e_contact_get_const (local->contact, E_CONTACT_UID)); + if ((uid = e_contact_get_const (local->contact, E_CONTACT_UID))) + g_hash_table_remove (ctxt->changed_hash, uid); return 0; } |