calendarui/organizerplugin/aiagendapluginengine/src/CalenAsyncCommands.cpp
branchRCL_3
changeset 59 aba12c885d83
parent 21 9711e452b5e9
child 67 1539a383d7b6
--- a/calendarui/organizerplugin/aiagendapluginengine/src/CalenAsyncCommands.cpp	Mon Jun 21 15:38:59 2010 +0300
+++ b/calendarui/organizerplugin/aiagendapluginengine/src/CalenAsyncCommands.cpp	Thu Jul 15 18:37:27 2010 +0300
@@ -418,8 +418,10 @@
                         &&
                         iInstanceArray[i]->StartTimeL().TimeLocalL() < iDay )
                         {
-                        delete iInstanceArray[i];
+                        CCalInstance* instance = iInstanceArray[i];
                         iInstanceArray.Remove( i );
+                        delete instance;
+                        
                         }
                     else
                         {
@@ -952,8 +954,9 @@
                     if( entry.EntryTypeL() == CCalEntry::EAppt && 
                         entry.StatusL() == CCalEntry::ECancelled )
                         {
-                        delete iInstanceArray[i];
+                        CCalInstance* instance = iInstanceArray[i];
                         iInstanceArray.Remove( i );
+                        delete instance;
                         }
                     else
                         {