[evolution-data-server] Bug #565961 - Crash with recurring all-day event
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Bug #565961 - Crash with recurring all-day event
- Date: Wed, 15 Jun 2011 13:08:00 +0000 (UTC)
commit a60a6c2479a594d4aa24cb0d34faa595f3434770
Author: Milan Crha <mcrha redhat com>
Date: Wed Jun 15 15:07:23 2011 +0200
Bug #565961 - Crash with recurring all-day event
calendar/libecal/e-cal-client.c | 14 ++++++++++----
calendar/libecal/e-cal.c | 16 +++++++++++-----
2 files changed, 21 insertions(+), 9 deletions(-)
---
diff --git a/calendar/libecal/e-cal-client.c b/calendar/libecal/e-cal-client.c
index 4f8e39d..42e6d5d 100644
--- a/calendar/libecal/e-cal-client.c
+++ b/calendar/libecal/e-cal-client.c
@@ -1425,12 +1425,15 @@ generate_instances (ECalClient *client, time_t start, time_t end, const gchar *u
}
} 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_client_get_timezone_sync (client, datetime.tzid, &start_zone, NULL, NULL);
+ if (datetime.tzid)
+ e_cal_client_get_timezone_sync (client, datetime.tzid, &start_zone, NULL, NULL);
+ else
+ start_zone = NULL;
e_cal_component_free_datetime (&datetime);
instances_hold = g_new0 (struct instances_info, 1);
@@ -1543,7 +1546,7 @@ e_cal_client_generate_instances_for_object (ECalClient *client, icalcomponent *i
gboolean result;
GSList *instances = NULL;
ECalComponentDateTime datetime;
- icaltimezone *start_zone;
+ icaltimezone *start_zone = NULL;
struct instances_info *instances_hold;
gboolean is_single_instance = FALSE;
@@ -1576,7 +1579,10 @@ e_cal_client_generate_instances_for_object (ECalClient *client, icalcomponent *i
/* Get the start timezone */
e_cal_component_get_dtstart (comp, &datetime);
- e_cal_client_get_timezone_sync (client, datetime.tzid, &start_zone, NULL, NULL);
+ if (datetime.tzid)
+ e_cal_client_get_timezone_sync (client, datetime.tzid, &start_zone, NULL, NULL);
+ else
+ start_zone = NULL;
e_cal_component_free_datetime (&datetime);
instances_hold = g_new0 (struct instances_info, 1);
diff --git a/calendar/libecal/e-cal.c b/calendar/libecal/e-cal.c
index 43624cc..936397a 100644
--- a/calendar/libecal/e-cal.c
+++ b/calendar/libecal/e-cal.c
@@ -3196,12 +3196,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);
@@ -3326,7 +3329,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;
@@ -3357,7 +3360,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);
@@ -3631,7 +3637,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]