aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLars Uebernickel <lars.uebernickel@canonical.com>2012-10-05 15:26:16 +0200
committerLars Uebernickel <lars.uebernickel@canonical.com>2012-10-05 15:26:16 +0200
commit618156d4f506a9abae79ee61895c29f00beeca49 (patch)
tree2fd08bcba0460880f1fd839419ca643b2ede7944 /src
parentafa16b907401ab78c34bd8adf93a21a4f5072ec1 (diff)
downloadayatana-indicator-datetime-618156d4f506a9abae79ee61895c29f00beeca49.tar.gz
ayatana-indicator-datetime-618156d4f506a9abae79ee61895c29f00beeca49.tar.bz2
ayatana-indicator-datetime-618156d4f506a9abae79ee61895c29f00beeca49.zip
Check return value of e_cal_client_new for NULL
Diffstat (limited to 'src')
-rw-r--r--src/datetime-service.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/datetime-service.c b/src/datetime-service.c
index 1a37fde..f0c45c0 100644
--- a/src/datetime-service.c
+++ b/src/datetime-service.c
@@ -734,6 +734,12 @@ update_appointment_menu_items (gpointer unused)
ESource *source = E_SOURCE (s->data);
ECalClient *ecal = e_cal_client_new(source, E_CAL_CLIENT_SOURCE_TYPE_EVENTS, &gerror);
+ if (!ecal) {
+ g_debug ("Cannot create ecal client: %s", gerror->message);
+ g_clear_error (&gerror);
+ continue;
+ }
+
icaltimezone* current_zone = icaltimezone_get_builtin_timezone(current_timezone);
if (!current_zone) {
// current_timezone may be a TZID?