diff -r c5b304f4d89b -r ed94e1e8390e mpengine/src/mpmpxcollectionframeworkwrapper_p.cpp --- a/mpengine/src/mpmpxcollectionframeworkwrapper_p.cpp Thu Sep 02 20:24:03 2010 +0300 +++ b/mpengine/src/mpmpxcollectionframeworkwrapper_p.cpp Fri Sep 17 08:28:52 2010 +0300 @@ -129,10 +129,10 @@ /*! \internal */ -void MpMpxCollectionFrameworkWrapperPrivate::init( TUid hostUid, MpSongData *songData ) +void MpMpxCollectionFrameworkWrapperPrivate::init( quint32 clientSecureId, MpSongData *songData ) { TX_ENTRY - iHostUid = hostUid; + iHostUid = TUid::Uid( clientSecureId ); iSongData = songData; TRAPD( err, DoInitL() ); if ( err != KErrNone ) { @@ -1423,13 +1423,19 @@ TX_ENTRY CMPXCollectionPath* cpath = iCollectionUtility->Collection().PathL(); CleanupStack::PushL( cpath ); - CMPXCollectionPlaylist* playList = CMPXCollectionPlaylist::NewL( *cpath ); - CleanupStack::PushL( playList ); - playList->SetShuffleL( true, false ); - MpSettingsManager::setShuffle( true ); - createPlaybackUtilityL(); - iPlaybackUtility->InitL( *playList, ETrue ); - CleanupStack::PopAndDestroy( playList ); + if ( cpath->Count() > 0 ) { + CMPXCollectionPlaylist* playList = CMPXCollectionPlaylist::NewL( *cpath ); + CleanupStack::PushL( playList ); + playList->SetShuffleL( true, false ); + MpSettingsManager::setShuffle( true ); + createPlaybackUtilityL(); + iPlaybackUtility->InitL( *playList, ETrue ); + CleanupStack::PopAndDestroy( playList ); + } + else { + //There were no songs to be played so switch back to collection view + emit q_ptr->restorePathFailed(); + } CleanupStack::PopAndDestroy( cpath ); TX_EXIT }