[gnome-calendar] Added check to e_cal_client_new.



commit 0fa570121095cbc707617322464e4830c72d5b32
Author: Erick PÃrez Castellanos <erick red gmail com>
Date:   Fri May 25 12:20:24 2012 -0400

    Added check to e_cal_client_new.

 src/gcal-manager.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-manager.c b/src/gcal-manager.c
index 9b98ba1..ff4d0ce 100644
--- a/src/gcal-manager.c
+++ b/src/gcal-manager.c
@@ -424,6 +424,12 @@ _gcal_manager_load_source (GcalManager *manager,
   priv = manager->priv;
   error = NULL;
   new_client = e_cal_client_new (source, E_CAL_CLIENT_SOURCE_TYPE_EVENTS, &error);
+  if (error != NULL)
+    {
+      g_warning ("Couldn't create ECalClient. Error: %s", error->message);
+      g_error_free (error);
+      return;
+    }
 
   unit = g_new0 (GcalManagerUnit, 1);
   unit->client = g_object_ref (new_client);



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