--- a/ipsservices/ipssossettings/src/ipssetdataapi.cpp Wed Sep 01 12:28:57 2010 +0100
+++ b/ipsservices/ipssossettings/src/ipssetdataapi.cpp Tue Sep 14 20:48:24 2010 +0300
@@ -665,18 +665,23 @@
FUNC_LOG;
TInt sizeLimit = aImap4Settings.BodyTextSizeLimit();
-
+ TInt limit(KMaxTInt);
CRepository* centRep = NULL;
TRAP_IGNORE( centRep = CRepository::NewL( KFreestyleEmailCenRep ) );
-
- TInt limit( 0 );
- TInt err = centRep->Get( KFreestyleMaxBodySize , limit );
- limit *= KKilo;
- if ( limit == 0 || err )
+ if (NULL != centRep)
{
- limit = KMaxTInt;
- }
-
+ //not necessary to push centRep as no leave function is called
+ TInt err = centRep->Get(KFreestyleMaxBodySize, limit);
+ limit *= KKilo;
+ if (limit == 0 || err)
+ {
+ limit = KMaxTInt;
+ }
+ //free
+ delete centRep;
+ centRep = NULL;
+ }//end if (NULL != centRep)
+
if ( sizeLimit == KIpsSetDataHeadersOnly )
{
aInfo.iTotalSizeLimit = KIpsSetDataHeadersOnly;