voicerecorder/AppSrc/CVRAppUI.cpp
branchRCL_3
changeset 8 49233e24b2ab
parent 7 6aee962f6139
child 10 bb90e4148332
--- a/voicerecorder/AppSrc/CVRAppUI.cpp	Fri Mar 12 15:43:04 2010 +0200
+++ b/voicerecorder/AppSrc/CVRAppUI.cpp	Mon Mar 15 12:40:50 2010 +0200
@@ -269,7 +269,12 @@
 			// The file service needs to abort if it's still going on
 			if ( iEmbeddedObserver )
 				{
-				dynamic_cast<CNewFileServiceBase*>(iEmbeddedObserver)->SetErrorCode(KErrAbort);
+				CNewFileServiceBase * iNewFileService = NULL;
+				iNewFileService = dynamic_cast<CNewFileServiceBase*>(iEmbeddedObserver);
+				if(iNewFileService != NULL)
+					{
+					iNewFileService->SetErrorCode(KErrAbort);
+					}
 				iEmbeddedObserver->AbortL();
 				}
 
@@ -286,7 +291,12 @@
 			// The file service needs to abort if it's still going on
 			if ( iEmbeddedObserver )
 				{
-				dynamic_cast<CNewFileServiceBase*>(iEmbeddedObserver)->SetErrorCode(KErrAbort);
+				CNewFileServiceBase * iNewFileService = NULL;
+				iNewFileService = dynamic_cast<CNewFileServiceBase*>(iEmbeddedObserver);
+				if(iNewFileService != NULL)
+					{
+					iNewFileService->SetErrorCode(KErrAbort);
+					}
 				iEmbeddedObserver->AbortL();
 				}