diff -r bf1d17376201 -r b13cd05eeb2f srsf/sisrscontrollerplugin/src/sicontrollerplugin.cpp --- a/srsf/sisrscontrollerplugin/src/sicontrollerplugin.cpp Thu Dec 17 08:46:30 2009 +0200 +++ b/srsf/sisrscontrollerplugin/src/sicontrollerplugin.cpp Mon Jan 18 20:20:30 2010 +0200 @@ -3343,10 +3343,13 @@ RUBY_DEBUG1( "CSIControllerPlugin::RunL. KAddVoiceTags. HandleLoadGrammarL Left with error [%d]", iResult ); // Clean up the iTrainArrays - iTrainArrays->ResetAndDestroy(); - iTrainArrays->Close(); - delete iTrainArrays; - iTrainArrays = NULL; + if ( iTrainArrays ) + { + iTrainArrays->ResetAndDestroy(); + iTrainArrays->Close(); + delete iTrainArrays; + iTrainArrays = NULL; + } // Send error message iControllerIf.SendSrsEvent( KUidAsrEventAddVoiceTags, iResult ); }