voicerecorder/RecViewSrc/CVRMdaRecorder.cpp
branchRCL_3
changeset 8 49233e24b2ab
parent 5 35a9006a7fc7
child 11 a2fdc35b8f46
--- a/voicerecorder/RecViewSrc/CVRMdaRecorder.cpp	Fri Mar 12 15:43:04 2010 +0200
+++ b/voicerecorder/RecViewSrc/CVRMdaRecorder.cpp	Mon Mar 15 12:40:50 2010 +0200
@@ -180,10 +180,19 @@
 		{
         
         // when mmc card is used and unpluged, this error returned
-        if (iMediaServerError == KErrCorrupt)
+        if (iMediaServerError == KErrCorrupt || iMediaServerError == KErrNotReady)
         	{
-        	iAudioRecorder->Close();
-        	dynamic_cast <CVRRecViewModel*>(iAutoStopObserver)->HandleCommandL(EEikCmdExit);
+        	CVRRecViewModel* iViewModel = NULL;
+        	//iAudioRecorder->Close();
+        	iViewModel = dynamic_cast <CVRRecViewModel*>(iAutoStopObserver);
+        	if(iViewModel != NULL)
+        		{
+        		iViewModel->HandleCommandL(EEikCmdExit);
+        		}
+        	else
+        		{
+        		CEikonEnv::Static()->EikAppUi()->HandleCommandL( EAknSoftkeyExit);
+        		}
         	}
  		
 		// Media server reports KErrDied if the playing was interrupted