diff -r e42293e811d8 -r 6c1dfe4da5dd mmappcomponents/collectionhelper/src/mpxcollectionhelperimp.cpp --- a/mmappcomponents/collectionhelper/src/mpxcollectionhelperimp.cpp Thu Aug 19 10:24:28 2010 +0300 +++ b/mmappcomponents/collectionhelper/src/mpxcollectionhelperimp.cpp Tue Aug 31 15:41:40 2010 +0300 @@ -549,25 +549,19 @@ CMPXMedia* foundMedia(NULL); - switch ( ary && ary->Count() ) //lint !e961 + if ( ary && ary->Count() ) { - case 0: - User::Leave(KErrNotFound); - case 1: - { - foundMedia = CMPXMedia::NewL(*ary->AtL(0)); - CleanupStack::PushL(foundMedia); - foundMedia->SetTObjectValueL( - KMPXMediaGeneralCollectionId, TUid::Uid(col) ); - CleanupStack::Pop(foundMedia); - break; - } - default: - User::Leave(KErrCorrupt); + foundMedia = CMPXMedia::NewL(*ary->AtL(0)); + CleanupStack::PushL(foundMedia); + foundMedia->SetTObjectValueL( KMPXMediaGeneralCollectionId, TUid::Uid(col) ); + CleanupStack::Pop(foundMedia); } - + else + { + User::Leave(KErrNotFound); + } + CleanupStack::PopAndDestroy(result); - return foundMedia; }