[evolution-patches] fix for the bug #330663 [exchange calendar]



Hi,
   Have attached the fix for the bug. Check for the presence of the
icalcomp before cloning it. The component ecomp->icomp may not be
present for a detached instance with no master object.

thanks, Chenthill.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-exchange/ChangeLog,v
retrieving revision 1.461
diff -u -p -u -p -r1.461 ChangeLog
--- ChangeLog	13 Feb 2006 07:02:50 -0000	1.461
+++ ChangeLog	13 Feb 2006 09:19:16 -0000
@@ -1,3 +1,9 @@
+2006-02-13  Chenthill Palanisamy  <pchenthill novell com>
+
+	Fixes#330663
+	* calendar/e-cal-backend-exchange.c: (match_object): Check for the 
+	presence of the icalcomp before cloning it.
+
 2006-02-10  Chenthill Palanisamy  <pchenthill novell com>
 
 	Fixes two crashes.
Index: calendar/e-cal-backend-exchange.c
===================================================================
RCS file: /cvs/gnome/evolution-exchange/calendar/e-cal-backend-exchange.c,v
retrieving revision 1.59
diff -u -p -u -p -r1.59 e-cal-backend-exchange.c
--- calendar/e-cal-backend-exchange.c	10 Feb 2006 10:10:29 -0000	1.59
+++ calendar/e-cal-backend-exchange.c	13 Feb 2006 09:19:16 -0000
@@ -1115,7 +1115,7 @@ match_object (gpointer key, gpointer val
 	ECalBackendExchangeComponent *ecomp = value;
 	struct search_data *sd = data;
 	ECalComponent *cal_comp;
-	icalcomponent *tmp;
+	icalcomponent *tmp = NULL;
 	char * ecal_str;
 	GList *inst;
 
@@ -1123,8 +1123,9 @@ match_object (gpointer key, gpointer val
 	cal_comp = e_cal_component_new ();
 
 	/* Find a way to test if the icalcomp added to cal_comp is not null */
-	tmp = icalcomponent_new_clone (ecomp->icomp);
-	if (tmp) {
+	/* ecomp->icomp would not exist for a detached instance with no master object */
+	if (ecomp->icomp) {
+		tmp = icalcomponent_new_clone (ecomp->icomp);
 		e_cal_component_set_icalcomponent (cal_comp, tmp);
 		if (e_cal_backend_sexp_match_comp (sd->sexp, cal_comp, sd->backend)) {
 			ecal_str = e_cal_component_get_as_string (cal_comp);


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