diff -r b7b49303d0c0 -r 762d760dcfdf mmappcomponents/collectionhelper/src/mpxcollectionhelperimp.cpp --- a/mmappcomponents/collectionhelper/src/mpxcollectionhelperimp.cpp Fri Jul 23 17:48:16 2010 -0500 +++ b/mmappcomponents/collectionhelper/src/mpxcollectionhelperimp.cpp Fri Aug 06 17:13:32 2010 -0500 @@ -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; }