--- a/phonebookui/Phonebook2/CommandsExtension/src/CPbk2MergeConflict.cpp Fri Mar 12 15:41:25 2010 +0200
+++ b/phonebookui/Phonebook2/CommandsExtension/src/CPbk2MergeConflict.cpp Mon Mar 15 12:39:26 2010 +0200
@@ -114,25 +114,26 @@
iFieldSecond = &aFieldSecond;
const MVPbkFieldType* fieldType = aFieldFirst.BestMatchingFieldType();
- __ASSERT_ALWAYS( fieldType, Panic( EPbk2FieldTypeNotExists ) );
-
- if( fieldType->NonVersitType() == EVPbkNonVersitTypeCodImage )
- {
- iConflictType = EPbk2ConflictTypeImage;
- }
- else
- {
- TArray<TVPbkFieldVersitProperty> versitPropArr = fieldType->VersitProperties();
- TInt count = versitPropArr.Count();
-
- for( TInt idx = 0; idx < count; idx++ )
+ if ( fieldType )
+ {
+ if( fieldType->NonVersitType() == EVPbkNonVersitTypeCodImage )
+ {
+ iConflictType = EPbk2ConflictTypeImage;
+ }
+ else
{
- TVPbkFieldVersitProperty versitProp = versitPropArr[idx];
- if( versitProp.Name() == EVPbkVersitNameLOGO ||
- versitProp.Name() == EVPbkVersitNamePHOTO )
+ TArray<TVPbkFieldVersitProperty> versitPropArr = fieldType->VersitProperties();
+ TInt count = versitPropArr.Count();
+
+ for( TInt idx = 0; idx < count; idx++ )
{
- iConflictType = EPbk2ConflictTypeImage;
- break;
+ TVPbkFieldVersitProperty versitProp = versitPropArr[idx];
+ if( versitProp.Name() == EVPbkVersitNameLOGO ||
+ versitProp.Name() == EVPbkVersitNamePHOTO )
+ {
+ iConflictType = EPbk2ConflictTypeImage;
+ break;
+ }
}
}
}
@@ -248,16 +249,19 @@
void CPbk2MergeConflict::CustomizeTextValueL( const MVPbkStoreContactField& aField, TDes& aBuf )
{
const MVPbkFieldType* fieldType= aField.BestMatchingFieldType();
- TVPbkNonVersitFieldType nonVersitType = fieldType->NonVersitType();
- if ( nonVersitType == EVPbkNonVersitTypeRingTone )
+ if ( fieldType )
{
- TParsePtr fileName = TParsePtr( aBuf );
- if ( fileName.NamePresent() )
+ TVPbkNonVersitFieldType nonVersitType = fieldType->NonVersitType();
+ if ( nonVersitType == EVPbkNonVersitTypeRingTone )
{
- TPtrC namePtr = fileName.Name();
- HBufC* name = namePtr.AllocL();
- aBuf.Copy( *name );
- delete name;
+ TParsePtr fileName = TParsePtr( aBuf );
+ if ( fileName.NamePresent() )
+ {
+ TPtrC namePtr = fileName.Name();
+ HBufC* name = namePtr.AllocL();
+ aBuf.Copy( *name );
+ delete name;
+ }
}
}
}