pimappservices/calendar/shared/src/agmsimpleentry.cpp
branchRCL_3
changeset 18 d68a4b5d5885
parent 0 f979ecb2b13e
child 29 12af337248b1
--- a/pimappservices/calendar/shared/src/agmsimpleentry.cpp	Tue May 11 16:12:24 2010 +0300
+++ b/pimappservices/calendar/shared/src/agmsimpleentry.cpp	Tue May 25 12:41:10 2010 +0300
@@ -67,7 +67,11 @@
 @internalComponent
 */
 	{
-	delete iRptDef;
+    if (iRptDef)
+        {
+        delete iRptDef;
+        iRptDef = NULL;
+        }
 	}
 
 
@@ -394,8 +398,15 @@
 			// Ensure that the start date actually falls on a repeating instance. For example,
 			// if the repeat rule is every Wednesday, and the DtStart is a Monday, it should be 
 			// nudged forwards to the Wednesday of that week.
-
-			TTime startTimeUtc = EntryTime().UtcL();
+			TTime startTimeUtc;
+			if (Type() == CCalEntry::ETodo)
+				{
+				startTimeUtc = StartTime().UtcL();
+				}
+			else
+				{
+			    startTimeUtc = EntryTime().UtcL();
+				}
 
 			startTimeUtc -= TTimeIntervalMicroSeconds(1);
 			TTime firstInstanceUtc;
@@ -428,7 +439,7 @@
 	TTime startTime = aNewEntryTimeLocal;
 	if (Type() == CCalEntry::ETodo)
 		{
-		startTime = DurationMinusL(startTime);
+		//startTime = DurationMinusL(startTime);
 		}
 	TAgnCalendarTime startAgnTime;
 	TAgnCalendarTime endAgnTime;