diff -r 696bfeff199e -r fa1df4b99609 messagingappbase/smartmessaging/vcardbc/src/vcardvpbutil.cpp --- a/messagingappbase/smartmessaging/vcardbc/src/vcardvpbutil.cpp Thu Jul 15 18:34:37 2010 +0300 +++ b/messagingappbase/smartmessaging/vcardbc/src/vcardvpbutil.cpp Thu Aug 19 09:51:11 2010 +0300 @@ -246,15 +246,25 @@ MVPbkStoreContact* CVCardVpbUtil::ContactData() const { __ASSERT_DEBUG( iContactsToShow.Count() > 0, Panic( ENoContactImported ) ); + // If iContactsToShow.Count() is zero, then it is not possible to parse the fields,so it has to return from here.. + if ( iContactsToShow.Count() == 0 ) + { + return NULL; + } return iContactsToShow[0]; } TBool CVCardVpbUtil::IsContactItemEmpty() { - const MVPbkStoreContactFieldCollection& fields = ContactData()->Fields(); + TBool ret( ETrue ); + MVPbkStoreContact* storeContact = ContactData(); + if ( !storeContact ) + { + return ret; + } + const MVPbkStoreContactFieldCollection& fields = storeContact->Fields(); TInt count = fields.FieldCount(); - TBool ret( ETrue ); while( count ) { __ASSERT_DEBUG( count <= fields.FieldCount() && count > 0,