phonebookengines/VirtualPhonebook/VPbkSimStore/src/CContactView.cpp
branchRCL_3
changeset 15 e8e3147d53eb
parent 0 e686773b3f54
child 64 c1e8ba0c2b16
--- 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 );
         }