[evolution-data-server/gnome-3-0] Bug #565961 - Crash with recurring all-day event



commit 8a0e80ed364117355132901caa94a737997674d4
Author: Milan Crha <mcrha redhat com>
Date:   Wed Jun 15 15:08:21 2011 +0200

    Bug #565961 - Crash with recurring all-day event

 calendar/libecal/e-cal.c |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/calendar/libecal/e-cal.c b/calendar/libecal/e-cal.c
index f30a4da..c828453 100644
--- a/calendar/libecal/e-cal.c
+++ b/calendar/libecal/e-cal.c
@@ -3034,12 +3034,15 @@ try_again:
 			}
 		} else {
 			ECalComponentDateTime datetime;
-			icaltimezone *start_zone;
+			icaltimezone *start_zone = NULL;
 			struct instances_info *instances_hold;
 
 			/* Get the start timezone */
 			e_cal_component_get_dtstart (comp, &datetime);
-			e_cal_get_timezone (ecal, datetime.tzid, &start_zone, NULL);
+			if (datetime.tzid)
+				e_cal_get_timezone (ecal, datetime.tzid, &start_zone, NULL);
+			else
+				start_zone = NULL;
 			e_cal_component_free_datetime (&datetime);
 
 			instances_hold = g_new0 (struct instances_info, 1);
@@ -3160,7 +3163,7 @@ e_cal_generate_instances_for_object (ECal *ecal, icalcomponent *icalcomp,
 	gboolean result;
 	GList *instances = NULL;
 	ECalComponentDateTime datetime;
-	icaltimezone *start_zone;
+	icaltimezone *start_zone = NULL;
 	struct instances_info *instances_hold;
 	gboolean is_single_instance = FALSE;
 
@@ -3191,7 +3194,10 @@ e_cal_generate_instances_for_object (ECal *ecal, icalcomponent *icalcomp,
 
 	/* Get the start timezone */
 	e_cal_component_get_dtstart (comp, &datetime);
-	e_cal_get_timezone (ecal, datetime.tzid, &start_zone, NULL);
+	if (datetime.tzid)
+		e_cal_get_timezone (ecal, datetime.tzid, &start_zone, NULL);
+	else
+		start_zone = NULL;
 	e_cal_component_free_datetime (&datetime);
 
 	instances_hold = g_new0 (struct instances_info, 1);
@@ -3471,7 +3477,7 @@ foreach_tzid_callback (icalparameter *param, gpointer cbdata)
 	ForeachTZIDCallbackData *data = cbdata;
 	ECalPrivate *priv;
 	const gchar *tzid;
-	icaltimezone *zone;
+	icaltimezone *zone = NULL;
 	icalcomponent *vtimezone_comp;
 	gchar *vtimezone_as_string;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]