evolution r37069 - in branches/gnome-2-24/calendar: . gui



Author: mcrha
Date: Wed Jan 14 12:43:19 2009
New Revision: 37069
URL: http://svn.gnome.org/viewvc/evolution?rev=37069&view=rev

Log:
2009-01-14  Milan Crha  <mcrha redhat com>

	** Fix for bug #554454

	* gui/e-cal-model.c: (e_cal_view_objects_modified_cb):
	Do not crash when received 'modified' event for something
	not in a model. And a leak fix.



Modified:
   branches/gnome-2-24/calendar/ChangeLog
   branches/gnome-2-24/calendar/gui/e-cal-model.c

Modified: branches/gnome-2-24/calendar/gui/e-cal-model.c
==============================================================================
--- branches/gnome-2-24/calendar/gui/e-cal-model.c	(original)
+++ branches/gnome-2-24/calendar/gui/e-cal-model.c	Wed Jan 14 12:43:19 2009
@@ -1518,6 +1518,15 @@
 			id = e_cal_component_get_id (comp);
 
 			comp_data = search_by_id_and_client (priv, client, id);
+
+			e_cal_component_free_id (id);
+			g_object_unref (comp);
+
+			if (!comp_data) {
+				/* the modified component is not in the model yet, just skip it */
+				continue;
+			}
+
 			if (comp_data->icalcomp)
 				icalcomponent_free (comp_data->icalcomp);
 			if (comp_data->dtstart) {



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