Fix for potential EIKON 5 panic in listboxes symbian1
authorSebastian Brannstrom <sebastianb@symbian.org>
Tue, 16 Nov 2010 00:37:11 +0000
branchsymbian1
changeset 359 16cc6373c043
parent 358 d2ce95126703
child 360 e2fa17cfc987
Fix for potential EIKON 5 panic in listboxes
application/src/PodcastListView.cpp
application/src/PodcastQueueView.cpp
--- a/application/src/PodcastListView.cpp	Tue Nov 16 00:28:12 2010 +0000
+++ b/application/src/PodcastListView.cpp	Tue Nov 16 00:37:11 2010 +0000
@@ -180,7 +180,7 @@
 
 		TInt index = iListboxPortrait->CurrentItemIndex();
 		
-		if (IsVisible())
+		if (IsVisible() && index >=0)
 			iListboxLandscape->SetCurrentItemIndex(index);
 
 		iListbox = iListboxLandscape;
@@ -197,7 +197,7 @@
 
 		TInt index = iListboxLandscape->CurrentItemIndex();
 		
-		if (IsVisible())
+		if (IsVisible() && index >=0)
 			iListboxPortrait->SetCurrentItemIndex(index);
 
 		iListbox = (CEikColumnListBox*) iListboxPortrait;
--- a/application/src/PodcastQueueView.cpp	Tue Nov 16 00:28:12 2010 +0000
+++ b/application/src/PodcastQueueView.cpp	Tue Nov 16 00:37:11 2010 +0000
@@ -314,7 +314,8 @@
 				}
 			
 			UpdateListboxItemsL();
-			iListContainer->Listbox()->SetCurrentItemIndex(index + 1);
+			if (index < iPodcastModel.ActiveShowList().Count() -1)
+				iListContainer->Listbox()->SetCurrentItemIndex(index + 1);
 			}
 			break;
 		case EPodcastSuspendDownloads: