Fix for bug 3051 - search wait dialog doesn't close if search fails symbian1
authorteknolog
Fri, 02 Jul 2010 15:57:01 +0100
branchsymbian1
changeset 154 fd105a5a9dad
parent 149 70b2f592a460
child 156 48cdb40709e7
Fix for bug 3051 - search wait dialog doesn't close if search fails
application/src/PodcastFeedView.cpp
--- a/application/src/PodcastFeedView.cpp	Mon Jun 07 23:06:17 2010 +0100
+++ b/application/src/PodcastFeedView.cpp	Fri Jul 02 15:57:01 2010 +0100
@@ -586,7 +586,13 @@
 			CleanupStack::PopAndDestroy(waitText);	
 	
 			iOpmlState = EOpmlSearching;
-			iPodcastModel.FeedEngine().SearchForFeedL(url);
+			TRAPD(err, iPodcastModel.FeedEngine().SearchForFeedL(url));
+			
+			if (err != KErrNone)
+				{
+				delete iWaitDialog;
+				iOpmlState = EOpmlIdle;
+				}
 			}
 		else
 			{
@@ -846,6 +852,8 @@
 			{
 			TBuf<KMaxMessageLength> message;
 			iEikonEnv->ReadResourceL(message, R_PODCAST_CONNECTION_ERROR);
+			delete iWaitDialog;
+			iOpmlState = EOpmlIdle;
 			ShowErrorMessageL(message);
 			}
 			break;