[next] telepathy-glib: client-factory: sink the newly created GVariant if props is NULL
Guillaume Desmottes
gdesmott at kemper.freedesktop.org
Thu Mar 6 07:46:47 PST 2014
Module: telepathy-glib
Branch: next
Commit: 0ec85cac31b27097038d684cf1ddd55b19ce1231
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=0ec85cac31b27097038d684cf1ddd55b19ce1231
Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date: Thu Mar 6 16:41:51 2014 +0100
client-factory: sink the newly created GVariant if props is NULL
---
telepathy-glib/client-factory.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/telepathy-glib/client-factory.c b/telepathy-glib/client-factory.c
index ec0ef66..10b6b88 100644
--- a/telepathy-glib/client-factory.c
+++ b/telepathy-glib/client-factory.c
@@ -477,11 +477,11 @@ tp_client_factory_ensure_account (TpClientFactory *self,
g_return_val_if_fail (TP_IS_CLIENT_FACTORY (self), NULL);
g_return_val_if_fail (g_variant_is_object_path (object_path), NULL);
- if (immutable_properties != NULL)
- g_variant_ref_sink (immutable_properties);
- else
+ if (immutable_properties == NULL)
immutable_properties = g_variant_new ("a{sv}", NULL);
+ g_variant_ref_sink (immutable_properties);
+
account = lookup_proxy (self, object_path);
if (account != NULL)
{
@@ -618,11 +618,11 @@ tp_client_factory_ensure_connection (TpClientFactory *self,
g_return_val_if_fail (TP_IS_CLIENT_FACTORY (self), NULL);
g_return_val_if_fail (g_variant_is_object_path (object_path), NULL);
- if (immutable_properties != NULL)
- g_variant_ref_sink (immutable_properties);
- else
+ if (immutable_properties == NULL)
immutable_properties = g_variant_new ("a{sv}", NULL);
+ g_variant_ref_sink (immutable_properties);
+
connection = lookup_proxy (self, object_path);
if (connection != NULL)
{
@@ -764,11 +764,11 @@ tp_client_factory_ensure_channel (TpClientFactory *self,
g_return_val_if_fail (tp_proxy_get_factory (connection) == self, NULL);
g_return_val_if_fail (g_variant_is_object_path (object_path), NULL);
- if (immutable_properties != NULL)
- g_variant_ref_sink (immutable_properties);
- else
+ if (immutable_properties == NULL)
immutable_properties = g_variant_new ("a{sv}", NULL);
+ g_variant_ref_sink (immutable_properties);
+
channel = lookup_proxy (self, object_path);
if (channel != NULL)
{
More information about the telepathy-commits
mailing list