calendarui/controller/src/calennotifier.cpp
branchRCL_3
changeset 27 aba12c885d83
parent 16 55d60436f00b
child 28 96907930389d
--- a/calendarui/controller/src/calennotifier.cpp	Mon Jun 21 15:38:59 2010 +0300
+++ b/calendarui/controller/src/calennotifier.cpp	Thu Jul 15 18:37:27 2010 +0300
@@ -776,9 +776,16 @@
 			case MCalFileChangeObserver::ECalendarInfoDeleted:
 				{
 				TFileName calFileName = aCalendarInfoChangeEntries[index]->FileNameL();
-                CCalSession& session = iGlobalData->CalSessionL( calFileName );
+                CCalSession* session = NULL;
+                TRAPD(err, session = &iGlobalData->CalSessionL( calFileName ));
+                if(KErrNotFound == err && ECalendarInfoUpdated == changeType)
+                    {
+                    BroadcastNotification(ECalenNotifyDeleteInstanceView);
+                    BroadcastNotification(ECalenNotifyCalendarInfoCreated);
+                    break;
+                    }
 				
-				CCalCalendarInfo* calendarInfo = session.CalendarInfoL();
+				CCalCalendarInfo* calendarInfo = session->CalendarInfoL();
                 CleanupStack::PushL(calendarInfo);
 
                 TBuf8<KBuffLength> keyBuff;
@@ -786,7 +793,7 @@
 
                 TBool markAsdelete;
                 TPckgC<TBool> pkgMarkAsDelete(markAsdelete);
-                TRAPD(err,pkgMarkAsDelete.Set(calendarInfo->PropertyValueL(keyBuff)));
+                TRAP(err,pkgMarkAsDelete.Set(calendarInfo->PropertyValueL(keyBuff)));
                 markAsdelete = pkgMarkAsDelete();
 
                 CleanupStack::PopAndDestroy(calendarInfo);