diff -r 6aee962f6139 -r 49233e24b2ab voicerecorder/AppSrc/CVRAppUI.cpp --- 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(iEmbeddedObserver)->SetErrorCode(KErrAbort); + CNewFileServiceBase * iNewFileService = NULL; + iNewFileService = dynamic_cast(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(iEmbeddedObserver)->SetErrorCode(KErrAbort); + CNewFileServiceBase * iNewFileService = NULL; + iNewFileService = dynamic_cast(iEmbeddedObserver); + if(iNewFileService != NULL) + { + iNewFileService->SetErrorCode(KErrAbort); + } iEmbeddedObserver->AbortL(); }