mpxplugins/viewplugins/views/collectionviewhg/src/mpxcollectionviewhgcontainer.cpp
branchRCL_3
changeset 17 70a8526f03f2
parent 15 a1247965635c
child 18 56b11cf8addb
--- a/mpxplugins/viewplugins/views/collectionviewhg/src/mpxcollectionviewhgcontainer.cpp	Tue Apr 27 16:34:37 2010 +0300
+++ b/mpxplugins/viewplugins/views/collectionviewhg/src/mpxcollectionviewhgcontainer.cpp	Tue May 11 16:10:56 2010 +0300
@@ -4359,7 +4359,16 @@
 			    {
                 if( iCurrentViewType == EMPXViewMediawall )
                     {
-                    ShowAlbumSongsDialogL( aResults );
+					// do not call ShowAlbumSongsDialogL if song count = 0
+					// otherwise panic occurs
+                    if( songArray->Count() )
+                        {
+                        ShowAlbumSongsDialogL( aResults );
+                        }
+                    else
+                        {
+                        iMediaWall->StartOpeningAnimationL( EFalse );
+                        }
                     }
                 else
                     {
@@ -4478,7 +4487,8 @@
     TInt songCount = songArray->Count();
 
     CDesC16ArrayFlat* songList = new (ELeave) CDesC16ArrayFlat(songCount);
-
+    CleanupStack::PushL(songList); 
+    
     if ( songCount > 1 )
         {
         HBufC* shuffleText = StringLoader::LoadLC(
@@ -4528,6 +4538,7 @@
 
     CTextListBoxModel* model = listBox->Model();
     model->SetItemTextArray( songList );
+    CleanupStack::Pop(); // songList
     model->SetOwnershipType( ELbmOwnsItemArray );
     CleanupStack::Pop( dialog );
     iDialog = dialog;