--- a/phonebookengines/VirtualPhonebook/VPbkSimStore/src/CContactView.cpp Fri Mar 12 15:41:25 2010 +0200
+++ b/phonebookengines/VirtualPhonebook/VPbkSimStore/src/CContactView.cpp Mon Mar 15 12:39:26 2010 +0200
@@ -393,9 +393,14 @@
//
const MVPbkViewContact& CContactView::ContactAtL( TInt aIndex ) const
{
- __ASSERT_ALWAYS( aIndex >= 0,
+ __ASSERT_ALWAYS( aIndex >= KErrNotFound,
VPbkError::Panic( VPbkError::EInvalidContactIndex ) );
- if ( aIndex >= iNativeView->CountL() )
+
+ if( aIndex == KErrNotFound)
+ {
+ User::Leave( KErrNotFound );
+ }
+ else if ( aIndex >= iNativeView->CountL() )
{
User::Leave( KErrArgument );
}