pimappservices/calendar/shared/src/agmsimpleentry.cpp
changeset 45 b6db4fd4947b
parent 18 c198609911f9
child 89 b57382753122
--- a/pimappservices/calendar/shared/src/agmsimpleentry.cpp	Mon May 03 12:30:32 2010 +0300
+++ b/pimappservices/calendar/shared/src/agmsimpleentry.cpp	Mon Jun 28 15:22:02 2010 +0530
@@ -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;