diff -r b3431bff8c19 -r 5586b4d2ec3e phonebookui/Phonebook2/CommandsExtension/src/CPbk2DeleteContactsCmd.cpp --- a/phonebookui/Phonebook2/CommandsExtension/src/CPbk2DeleteContactsCmd.cpp Wed Mar 31 21:13:53 2010 +0300 +++ b/phonebookui/Phonebook2/CommandsExtension/src/CPbk2DeleteContactsCmd.cpp Wed Apr 14 15:45:35 2010 +0300 @@ -239,13 +239,16 @@ iContactIterator->SetToFirst(); if ( iContactIterator->HasNext() ) { - MVPbkContactLink* link = iContactIterator->NextL(); - CleanupDeletePushL( link ); - if ( link ) + while ( MVPbkContactLink* link = iContactIterator->NextL() ) { - RetrieveContactL( *link ); - } - CleanupStack::PopAndDestroy(); // link + if ( !IsFromReadOnlyStore( *link ) ) + { + CleanupDeletePushL( link ); + RetrieveContactL( *link ); + CleanupStack::PopAndDestroy(); // link + break; + } + } } } else