}
if( _clipBoard_ != NULL ) {
addrclip_free( _clipBoard_ );
+ _clipBoard_ = NULL;
}
if( _addressIndex_ != NULL ) {
addrindex_free_index( _addressIndex_ );
}
static void addressbook_folder_load_person( GtkCMCTree *clist, ItemFolder *itemFolder ) {
- GList *items;
+ GList *items, *cur;
AddressTypeControlItem *atci = addrbookctl_lookup( ADDR_ITEM_PERSON );
AddressTypeControlItem *atciMail = addrbookctl_lookup( ADDR_ITEM_EMAIL );
const gchar *search_str;
/* Load email addresses */
items = addritem_folder_get_person_list( itemFolder );
- for( ; items != NULL; items = g_list_next( items ) ) {
+ for(cur = items ; cur != NULL; cur = g_list_next( cur ) ) {
ItemPerson *person;
GList *node;
ItemEMail *email;
- person = (ItemPerson *)items->data;
+ person = (ItemPerson *)cur->data;
if (!person)
continue;
node = person->listEMail;
continue;
}
- addressbook_folder_load_one_person( clist, items->data, atci, atciMail );
+ addressbook_folder_load_one_person( clist, cur->data, atci, atciMail );
}
/* Free up the list */
mgu_clear_list( items );
void addressbook_read_file( void ) {
AddressIndex *addrIndex = NULL;
gchar *indexdir = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, ADDRBOOK_DIR, NULL);
-
+
debug_print( "Reading address index...\n" );
if( _addressIndex_ ) {
debug_print( "address book already read!!!\n" );
+ g_free(indexdir);
return;
}