voicerecorder/RecViewSrc/CVRMdaRecorder.cpp
branchRCL_3
changeset 13 4e5b531d23cb
parent 11 a2fdc35b8f46
child 14 f962425b9f8b
--- a/voicerecorder/RecViewSrc/CVRMdaRecorder.cpp	Tue Apr 27 16:40:59 2010 +0300
+++ b/voicerecorder/RecViewSrc/CVRMdaRecorder.cpp	Tue May 11 16:15:58 2010 +0300
@@ -187,11 +187,11 @@
         	iViewModel = dynamic_cast <CVRRecViewModel*>(iAutoStopObserver);
         	if(iViewModel != NULL)
         		{
-        		iViewModel->HandleCommandL(EEikCmdExit);
+        		TRAP_IGNORE( iViewModel->HandleCommandL(EEikCmdExit) );
         		}
         	else
         		{
-        		CEikonEnv::Static()->EikAppUi()->HandleCommandL( EAknSoftkeyExit);
+        		TRAP_IGNORE( CEikonEnv::Static()->EikAppUi()->HandleCommandL( EAknSoftkeyExit) );
         		}
         	}
  		
@@ -934,10 +934,15 @@
         iPropVRState.Set( KPSUidVoiceRecorder, KVoiceRecorderMode, EVRIdle );
         // Used to check the state of a phone call if any
        
-        if ( iCurrentCallHandler ) delete iCurrentCallHandler;
+        if ( iCurrentCallHandler ) 
+        	{
+        	delete iCurrentCallHandler;
+        	iCurrentCallHandler = NULL;
+        	}
         
     	TRAP_IGNORE( iCurrentCallHandler = CVRSystemEventHandler::NewL() );
-    	TInt currentState( iCurrentCallHandler->StateL(	KPSUidCtsyCallInformation, KCTsyCallState ) );
+    	TInt currentState( 0 );
+    	TRAP_IGNORE( currentState = iCurrentCallHandler->StateL( KPSUidCtsyCallInformation, KCTsyCallState ) );
     	
     	// Do not allow screen saver if there is an active phone call
     	if(currentState == EPSCTsyCallStateRinging)