$OpenBSD: patch-js_ui_calendar_js,v 1.1 2012/11/15 08:32:36 ajacoutot Exp $

From a4e29e1244b097fc2bebc371e00d7af30537c376 Mon Sep 17 00:00:00 2001
From: Florian Müllner <fmuellner@gnome.org>
Date: Tue, 23 Oct 2012 12:32:27 +0000
Subject: calendar: Handle calendar-server errors

--- js/ui/calendar.js.orig	Mon Nov 12 21:18:59 2012
+++ js/ui/calendar.js	Thu Nov 15 09:16:05 2012
@@ -270,8 +270,9 @@ const DBusEventSource = new Lang.Class({
         this._loadEvents(false);
     },
 
-    _onEventsReceived: function([appointments]) {
+    _onEventsReceived: function(results, error) {
         let newEvents = [];
+        let appointments = results ? results[0] : null;
         if (appointments != null) {
             for (let n = 0; n < appointments.length; n++) {
                 let a = appointments[n];
