[evolution-ews] Bug 680960 - Invalid g_object_ref() call on evolution start
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Bug 680960 - Invalid g_object_ref() call on evolution start
- Date: Wed, 1 Aug 2012 11:49:39 +0000 (UTC)
commit dcdc8c832e4343d288e85729b42c59c78a1fab20
Author: Matthew Barnes <mbarnes redhat com>
Date: Wed Aug 1 07:47:24 2012 -0400
Bug 680960 - Invalid g_object_ref() call on evolution start
src/camel/camel-ews-store.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/camel/camel-ews-store.c b/src/camel/camel-ews-store.c
index 5ee9cfd..ba3ff6f 100644
--- a/src/camel/camel-ews-store.c
+++ b/src/camel/camel-ews-store.c
@@ -1036,9 +1036,18 @@ ews_get_name (CamelService *service,
EEwsConnection *
camel_ews_store_ref_connection (CamelEwsStore *ews_store)
{
+ EEwsConnection *connection = NULL;
+
g_return_val_if_fail (CAMEL_IS_EWS_STORE (ews_store), NULL);
- return g_object_ref (ews_store->priv->connection);
+ g_mutex_lock (ews_store->priv->connection_lock);
+
+ if (ews_store->priv->connection != NULL)
+ connection = g_object_ref (ews_store->priv->connection);
+
+ g_mutex_unlock (ews_store->priv->connection_lock);
+
+ return connection;
}
static CamelFolder *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]