[evolution-kolab] ECalBackendKolab: do not operate on KolabMailAccess if backend is not opened



commit 8346cbf7dc7b8c17c4ab3dfc2ef13bb547cbbf4c
Author: Christian Hilberg <hilberg kernelconcepts de>
Date:   Wed Oct 24 16:11:48 2012 +0200

    ECalBackendKolab: do not operate on KolabMailAccess if backend is not opened

 src/calendar/e-cal-backend-kolab.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/calendar/e-cal-backend-kolab.c b/src/calendar/e-cal-backend-kolab.c
index 119cb3b..0c2498b 100644
--- a/src/calendar/e-cal-backend-kolab.c
+++ b/src/calendar/e-cal-backend-kolab.c
@@ -185,6 +185,12 @@ cal_backend_kolab_signal_online_cb (GObject *object)
 	 *
 	 */
 
+	if (priv->cal_koma == NULL) {
+		g_warning ("%s()[%u] Backend not yet opened, ignoring online state request",
+		           __func__, __LINE__);
+		return;
+	}
+
 	(void) kolab_util_backend_deploy_mode_by_backend (priv->cal_koma,
 	                                                  online,
 	                                                  NULL, /* GCancellable (see above ) */
@@ -1748,6 +1754,12 @@ cal_backend_kolab_start_view (ECalBackend *backend,
 
 	g_object_ref (view); /* unref()d in stop_view() */
 
+	if (priv->cal_koma == NULL) {
+		g_warning ("%s()[%u] Backend not been opened, not updating view",
+		           __func__, __LINE__);
+		goto exit;
+	}
+
 	query = e_data_cal_view_get_text (view);
 	foldername = kolab_util_backend_get_foldername (E_BACKEND (backend));
 



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