application/src/PodcastQueueView.cpp
changeset 111 12c59f14a031
parent 101 867fc277ffea
child 115 d87e984bd8b8
--- a/application/src/PodcastQueueView.cpp	Sun Apr 04 16:23:10 2010 +0100
+++ b/application/src/PodcastQueueView.cpp	Sun Apr 04 18:06:31 2010 +0100
@@ -522,16 +522,18 @@
 			TInt index = iListContainer->Listbox()->CurrentItemIndex();
 			if (index >= 0 && index < iPodcastModel.ActiveShowList().Count())
 				{
-				if (iPodcastModel.ShowEngine().RemoveDownloadL(iPodcastModel.ActiveShowList()[index]->Uid()))
+				TRAPD(err, iPodcastModel.ShowEngine().RemoveDownloadL(iPodcastModel.ActiveShowList()[index]->Uid()));
+				
+				if (err == KErrNone)
 					{
-						iItemArray->Delete(index);
-						iItemIdArray.Remove(index);						
-						iListContainer->Listbox()->HandleItemRemovalL();
-						iListContainer->Listbox()->SetCurrentItemIndex(index - 1 > 0 ? index - 1 : 0);
-						iListContainer->Listbox()->DrawNow();
-						
-						delete iPodcastModel.ActiveShowList()[index];
-						iPodcastModel.ActiveShowList().Remove(index);
+					iItemArray->Delete(index);
+					iItemIdArray.Remove(index);						
+					iListContainer->Listbox()->HandleItemRemovalL();
+					iListContainer->Listbox()->SetCurrentItemIndex(index - 1 > 0 ? index - 1 : 0);
+					iListContainer->Listbox()->DrawNow();
+					
+					delete iPodcastModel.ActiveShowList()[index];
+					iPodcastModel.ActiveShowList().Remove(index);
 					}
 				}
 			}