Fix for N_SE-45551
authorAmith Kumar Mahale <amith.m@samsung.com>
Wed, 10 Jul 2013 05:49:35 +0000 (11:19 +0530)
committerAmith Kumar Mahale <amith.m@samsung.com>
Wed, 10 Jul 2013 05:49:35 +0000 (11:19 +0530)
Change-Id: I7d0522f20ff1ef4c17e492e3488f1c69dbe0cbe2
Signed-off-by: Amith Kumar Mahale <amith.m@samsung.com>
src/ClDayEventListForm.cpp

index 89ecfa5..8134de8 100644 (file)
@@ -232,24 +232,23 @@ DayEventListForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneI
                        __endDate = *static_cast<DateTime*>(pArgs->GetAt(1));
                }
                delete pArgs;
-
-               if (__pEvents)
-               {
-                       __pEvents->RemoveAll(true);
-                       delete __pEvents;
-                       __pEvents = null;
-               }
-
                String title;
                __pDateFormatter->Format(__startDate, title);
                GetHeader()->SetTitleText(title);
 
-               CalendarbookFilter filter(CB_FI_TYPE_NON_ALL_DAY_EVENT_INSTANCE);
-               filter.AppendDateTime(FI_CONJ_OP_NONE, EVENT_INST_FI_PR_END_TIME, FI_CMP_OP_GREATER_THAN_OR_EQUAL, ResourceManager::ConvertWallTimeToUtcTime(__startDate));
-               filter.AppendDateTime(FI_CONJ_OP_AND, EVENT_INST_FI_PR_START_TIME, FI_CMP_OP_LESS_THAN_OR_EQUAL, ResourceManager::ConvertWallTimeToUtcTime(__endDate));
-               __pEvents = __pCalendarbook->SearchN(filter, EVENT_INST_FI_PR_START_TIME, SORT_ORDER_ASCENDING);
-               __pEventsListView->UpdateList();
        }
+       if (__pEvents)
+       {
+               __pEvents->RemoveAll(true);
+               delete __pEvents;
+               __pEvents = null;
+       }
+       CalendarbookFilter filter(CB_FI_TYPE_NON_ALL_DAY_EVENT_INSTANCE);
+       filter.AppendDateTime(FI_CONJ_OP_NONE, EVENT_INST_FI_PR_END_TIME, FI_CMP_OP_GREATER_THAN_OR_EQUAL, ResourceManager::ConvertWallTimeToUtcTime(__startDate));
+       filter.AppendDateTime(FI_CONJ_OP_AND, EVENT_INST_FI_PR_START_TIME, FI_CMP_OP_LESS_THAN_OR_EQUAL, ResourceManager::ConvertWallTimeToUtcTime(__endDate));
+       __pEvents = __pCalendarbook->SearchN(filter, EVENT_INST_FI_PR_START_TIME, SORT_ORDER_ASCENDING);
+       __pEventsListView->UpdateList();
+
 }
 
 void