mtpfws/mtpfw/src/cmtpframeworkconfig.cpp
changeset 52 866b4af7ffbe
parent 49 c20dd21d1eb4
--- a/mtpfws/mtpfw/src/cmtpframeworkconfig.cpp	Fri Sep 17 11:40:03 2010 +0800
+++ b/mtpfws/mtpfw/src/cmtpframeworkconfig.cpp	Tue Sep 28 20:14:08 2010 +0800
@@ -44,9 +44,14 @@
     {
     //Save the AbnormalDown state to EFalse
     const TInt KNormalShutDownValue = 0;
-    iRepository->Set(EAbnormalDown, KNormalShutDownValue);
     
-    delete iRepository;
+    if( iRepository )
+    	{
+    	iRepository->Set(EAbnormalDown, KNormalShutDownValue);
+    	delete iRepository;
+    	iRepository = NULL;
+  		}
+    
     }
 
 EXPORT_C void CMTPFrameworkConfig::GetValueL(TParameter aParam, TDes& aValue) const