fix for the bug #330663 [exchange calendar]

chen <[email protected]>
Newsgroups gmane.comp.gnome.evolution.patches
Message-ID <[email protected]>
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.

_______________________________________________
Evolution-patches mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/evolution-patches
330663.diff (text/x-patch, 1.8 KB)
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  <[email protected]>
+
+	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  <[email protected]>
 
 	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);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.