musichomescreen_multiview/musicplayeractionhandlerplugin/src/musicplayeractionhandler.cpp
--- a/musichomescreen_multiview/musicplayeractionhandlerplugin/src/musicplayeractionhandler.cpp Thu Jan 07 12:45:53 2010 +0200
+++ b/musichomescreen_multiview/musicplayeractionhandlerplugin/src/musicplayeractionhandler.cpp Mon Jan 18 20:18:06 2010 +0200
@@ -67,7 +67,7 @@
MPX_DEBUG1("-->CMusicPlayerActionHandler::ConstructL()");
//iPlaybackUtility = MMPXPlaybackUtility::UtilityL( KPbModeActivePlayer );
- iPlaybackUtility = MMPXPlaybackUtility::NewL( KMusicPlayerAppUid);
+ //iPlaybackUtility = MMPXPlaybackUtility::NewL( KMusicPlayerAppUid);
MPX_DEBUG1("<--CMusicPlayerActionHandler::ConstructL()");
}
@@ -122,6 +122,10 @@
errCode = ExtractVariantL( aMap, variant, KCommand );
if ( errCode == KErrNone )
{
+ if ( !iPlaybackUtility ) // Ensure that the utility exists
+ {
+ iPlaybackUtility = MMPXPlaybackUtility::NewL( KMusicPlayerAppUid);
+ }
TMPXPlaybackCommand Command;
Command = static_cast<TMPXPlaybackCommand>( variant.AsTInt32() );
iPlaybackUtility->CommandL( Command );