telepathy-glib: tp_account_dup_storage_identifier_variant: deal with storage_identifier being NULL

Simon McVittie smcv at kemper.freedesktop.org
Mon Aug 13 02:58:50 PDT 2012


Module: telepathy-glib
Branch: master
Commit: 21d9f38246c9c11307e9b170ebf0e8589909faa3
URL:    http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=21d9f38246c9c11307e9b170ebf0e8589909faa3

Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date:   Tue Aug  7 10:07:50 2012 +0200

tp_account_dup_storage_identifier_variant: deal with storage_identifier being NULL

https://bugs.freedesktop.org/show_bug.cgi?id=53201

---

 telepathy-glib/account.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/telepathy-glib/account.c b/telepathy-glib/account.c
index 005a29d..781481c 100644
--- a/telepathy-glib/account.c
+++ b/telepathy-glib/account.c
@@ -3876,6 +3876,9 @@ tp_account_dup_storage_identifier_variant (TpAccount *self)
 {
   g_return_val_if_fail (TP_IS_ACCOUNT (self), NULL);
 
+  if (self->priv->storage_identifier == NULL)
+    return NULL;
+
   return g_variant_ref_sink (dbus_g_value_build_g_variant (
         self->priv->storage_identifier));
 }



More information about the telepathy-commits mailing list