aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorJP Rosevear <jpr@novell.com>2005-03-24 23:38:39 +0800
committerJP Rosevear <jpr@src.gnome.org>2005-03-24 23:38:39 +0800
commitd119772345dd43d0dda4290e28dde319a1d55cd6 (patch)
tree9c697ee5597ab2c14cf6ac1632452c705de9744c /calendar
parent6985a41db23ac41367cfe1f4355f96e230b9d182 (diff)
downloadgsoc2013-evolution-d119772345dd43d0dda4290e28dde319a1d55cd6.tar.gz
gsoc2013-evolution-d119772345dd43d0dda4290e28dde319a1d55cd6.tar.zst
gsoc2013-evolution-d119772345dd43d0dda4290e28dde319a1d55cd6.zip
Fixes #69272
2005-03-24 JP Rosevear <jpr@novell.com> Fixes #69272 * gui/comp-util.c (cal_comp_event_new_with_defaults): ensure we always return a valid comp * gui/comp-util.c (cal_comp_task_new_with_defaults): ditto; fix obvious pasto that would cause a leak svn path=/trunk/; revision=29107
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog10
-rw-r--r--calendar/gui/comp-util.c20
2 files changed, 16 insertions, 14 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 021000e746..de81f6fc0f 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,13 @@
+2005-03-24 JP Rosevear <jpr@novell.com>
+
+ Fixes #69272
+
+ * gui/comp-util.c (cal_comp_event_new_with_defaults): ensure we
+ always return a valid comp
+
+ * gui/comp-util.c (cal_comp_task_new_with_defaults): ditto; fix
+ obvious pasto that would cause a leak
+
2005-03-24 Chenthill Palanisamy <pchenthill@novell.com>
Fixes #73320
diff --git a/calendar/gui/comp-util.c b/calendar/gui/comp-util.c
index 0ee3e696bb..2be56453c1 100644
--- a/calendar/gui/comp-util.c
+++ b/calendar/gui/comp-util.c
@@ -256,13 +256,13 @@ cal_comp_event_new_with_defaults (ECal *client)
ECalComponentAlarmTrigger trigger;
if (!e_cal_get_default_object (client, &icalcomp, NULL))
- return NULL;
+ icalcomp = icalcomponent_new (ICAL_VEVENT_COMPONENT);
comp = e_cal_component_new ();
if (!e_cal_component_set_icalcomponent (comp, icalcomp)) {
- g_object_unref (comp);
icalcomponent_free (icalcomp);
- return NULL;
+
+ e_cal_component_set_new_vtype (comp, E_CAL_COMPONENT_EVENT);
}
if (!calendar_config_get_use_default_reminder ())
@@ -358,21 +358,13 @@ cal_comp_task_new_with_defaults (ECal *client)
icalcomponent *icalcomp;
if (!e_cal_get_default_object (client, &icalcomp, NULL))
- return NULL;
-
+ icalcomp = icalcomponent_new (ICAL_VTODO_COMPONENT);
+
comp = e_cal_component_new ();
if (!e_cal_component_set_icalcomponent (comp, icalcomp)) {
- g_object_unref (comp);
icalcomponent_free (icalcomp);
- return NULL;
- }
-
- comp = e_cal_component_new ();
- if (!e_cal_component_set_icalcomponent (comp, icalcomp)) {
- g_object_unref (comp);
- icalcomponent_free (icalcomp);
- return NULL;
+ e_cal_component_set_new_vtype (comp, E_CAL_COMPONENT_TODO);
}
return comp;