diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2014-03-06 16:41:51 +0100 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2014-03-06 16:41:51 +0100 |
commit | 0ec85cac31b27097038d684cf1ddd55b19ce1231 (patch) | |
tree | edec65fb0bf64750a3d4773219b4ac86e70ae3ce | |
parent | e526824b420495ffeba31e164bfa12c86084e4da (diff) |
client-factory: sink the newly created GVariant if props is NULL
-rw-r--r-- | telepathy-glib/client-factory.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/telepathy-glib/client-factory.c b/telepathy-glib/client-factory.c index ec0ef6664..10b6b88b1 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) { |