[evolution-data-server] Bug #628100 - Weather's cal get_object can ask for nonexistent comp



commit a4d63f959af47861ae4c65a3402b32a8fe2a85c7
Author: Milan Crha <mcrha redhat com>
Date:   Wed Sep 1 10:43:57 2010 +0200

    Bug #628100 - Weather's cal get_object can ask for nonexistent comp

 calendar/backends/weather/e-cal-backend-weather.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/calendar/backends/weather/e-cal-backend-weather.c b/calendar/backends/weather/e-cal-backend-weather.c
index 72f158b..ffc0a41 100644
--- a/calendar/backends/weather/e-cal-backend-weather.c
+++ b/calendar/backends/weather/e-cal-backend-weather.c
@@ -573,7 +573,10 @@ e_cal_backend_weather_get_object (ECalBackendSync *backend, EDataCal *cal, const
 	e_return_data_cal_error_if_fail (priv->store != NULL, InvalidArg);
 
 	comp = e_cal_backend_store_get_component (priv->store, uid, rid);
-	e_return_data_cal_error_if_fail (comp != NULL, ObjectNotFound);
+	if (!comp) {
+		g_propagate_error (error, EDC_ERROR (ObjectNotFound));
+		return;
+	}
 
 	*object = e_cal_component_get_as_string (comp);
 	g_object_unref (comp);



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