From 598a304b37d4572650627377fb5a5c220739a0a3 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Wed, 9 Dec 2009 16:46:07 +0100 Subject: EDS Calendar: set pointer to NULL to protect against ecal bug (MB #8005) e_cal_get_object() seems to run into situations where it neither sets the "comp" pointer nor returns an error. SyncEvolution was using an uninitialized pointer in that case. Set the "comp" pointer to NULL to detect this kind of failure => "ERROR retrieving item...". --- src/backends/evolution/EvolutionCalendarSource.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backends/evolution/EvolutionCalendarSource.cpp b/src/backends/evolution/EvolutionCalendarSource.cpp index c7b0d3ac..d97102d4 100644 --- a/src/backends/evolution/EvolutionCalendarSource.cpp +++ b/src/backends/evolution/EvolutionCalendarSource.cpp @@ -560,7 +560,7 @@ void EvolutionCalendarSource::removeItem(const string &luid) icalcomponent *EvolutionCalendarSource::retrieveItem(const ItemID &id) { GError *gerror = NULL; - icalcomponent *comp; + icalcomponent *comp = NULL; if (!e_cal_get_object(m_calendar, id.m_uid.c_str(), -- cgit v1.2.3