serviceproviders/sapi_contacts_vpbk/contactservice/src/singlecontact.cpp
changeset 12 f4292e0e20df
parent 10 fc9cf246af83
child 27 02682e02e51f
equal deleted inserted replaced
11:5c0037c72160 12:f4292e0e20df
   185 		{
   185 		{
   186 		//Get the field at iFieldIndex in the contact
   186 		//Get the field at iFieldIndex in the contact
   187 		MVPbkStoreContactField& field = aSingleContact->Fields().FieldAt(aIndex);
   187 		MVPbkStoreContactField& field = aSingleContact->Fields().FieldAt(aIndex);
   188 		
   188 		
   189 		//Get the fieldKey of the field 
   189 		//Get the fieldKey of the field 
   190 	    TPtrC8 fieldKey = CSearchFields::GetFieldKeyFromId(field.BestMatchingFieldType()->FieldTypeResId());
   190 		const MVPbkFieldType* fieldType = field.BestMatchingFieldType();
       
   191 	      if(fieldType == NULL)
       
   192 	          {
       
   193 	          CleanupStack::PopAndDestroy(contactField);   
       
   194 	          return NULL;
       
   195 	          }
       
   196 	  		TInt idval = fieldType->FieldTypeResId();
       
   197 	    TPtrC8 fieldKey = CSearchFields::GetFieldKeyFromId(idval);
   191 		if(fieldKey.Compare(KNullDesC8) == 0)
   198 		if(fieldKey.Compare(KNullDesC8) == 0)
   192 			{
   199 			{
   193 			CleanupStack::PopAndDestroy(contactField);		
   200 			CleanupStack::PopAndDestroy(contactField);		
   194 			return NULL;
   201 			return NULL;
   195 			}
   202 			}