emailservices/emailserver/cmailhandlerplugin/src/cmailcpsif.cpp
branchRCL_3
changeset 24 b5fbb9b25d57
parent 19 b13141f05c3d
child 52 efd4f1afd43e
--- a/emailservices/emailserver/cmailhandlerplugin/src/cmailcpsif.cpp	Tue Apr 27 16:20:14 2010 +0300
+++ b/emailservices/emailserver/cmailhandlerplugin/src/cmailcpsif.cpp	Tue May 11 15:57:15 2010 +0300
@@ -1179,7 +1179,10 @@
 void CMailCpsIf::SetUpdateNeeded( const TInt aInstance, const TBool aValue )
     {
     FUNC_LOG;
-    iInstIdList[aInstance].iUpdateNeeded = aValue;
+    if ( aInstance >= 0 && aInstance < GetWidgetInstanceCount() )
+        {
+        iInstIdList[aInstance].iUpdateNeeded = aValue;
+        }
     }
 
 // ---------------------------------------------------------------------------
@@ -1189,6 +1192,11 @@
 TBool CMailCpsIf::UpdateNeeded( const TInt aInstance )
     {
     FUNC_LOG;
-    return iInstIdList[aInstance].iUpdateNeeded;
+    TBool rVal( EFalse );
+    if ( aInstance >= 0 && aInstance < GetWidgetInstanceCount() )
+        {
+        rVal = iInstIdList[aInstance].iUpdateNeeded;
+        }
+    return rVal;
     }