diff -r 64200268cac2 -r 866b4af7ffbe mtpfws/mtpfw/src/cmtpframeworkconfig.cpp --- 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