srsf/sisrscontrollerplugin/src/sicontrollerplugin.cpp
changeset 1 b13cd05eeb2f
parent 0 bf1d17376201
child 11 6347473a7bb2
--- 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 );
                 }