diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2008-04-02 21:12:43 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2008-04-02 21:12:43 +0800 |
commit | 18e4f997fa9f3fad3c53a53df05e43e523067393 (patch) | |
tree | 52276154c79a4bee0595cd10b03331417b39ae0d /libempathy | |
parent | 6165439156c260dd153c330069e1dd1955ffe444 (diff) | |
download | gsoc2013-empathy-18e4f997fa9f3fad3c53a53df05e43e523067393.tar gsoc2013-empathy-18e4f997fa9f3fad3c53a53df05e43e523067393.tar.gz gsoc2013-empathy-18e4f997fa9f3fad3c53a53df05e43e523067393.tar.bz2 gsoc2013-empathy-18e4f997fa9f3fad3c53a53df05e43e523067393.tar.lz gsoc2013-empathy-18e4f997fa9f3fad3c53a53df05e43e523067393.tar.xz gsoc2013-empathy-18e4f997fa9f3fad3c53a53df05e43e523067393.tar.zst gsoc2013-empathy-18e4f997fa9f3fad3c53a53df05e43e523067393.zip |
Display a warning if used when not ready instead of silently return.
svn path=/trunk/; revision=862
Diffstat (limited to 'libempathy')
-rw-r--r-- | libempathy/empathy-tp-contact-factory.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/libempathy/empathy-tp-contact-factory.c b/libempathy/empathy-tp-contact-factory.c index 4737b2fb7..66be90270 100644 --- a/libempathy/empathy-tp-contact-factory.c +++ b/libempathy/empathy-tp-contact-factory.c @@ -586,9 +586,7 @@ tp_contact_factory_request_everything (EmpathyTpContactFactory *tp_factory, EmpathyTpContactFactoryPriv *priv = GET_PRIV (tp_factory); guint *dup_handles; - if (!priv->ready) { - return; - } + g_return_if_fail (priv->ready); dup_handles = g_malloc0 ((handles->len + 1) * sizeof (guint)); g_memmove (dup_handles, handles->data, handles->len * sizeof (guint)); @@ -1075,13 +1073,10 @@ empathy_tp_contact_factory_set_alias (EmpathyTpContactFactory *tp_factory, g_return_if_fail (EMPATHY_IS_TP_CONTACT_FACTORY (tp_factory)); g_return_if_fail (EMPATHY_IS_CONTACT (contact)); + g_return_if_fail (priv->ready); g_return_if_fail (empathy_account_equal (empathy_contact_get_account (contact), priv->account)); - if (!priv->ready) { - return; - } - handle = empathy_contact_get_handle (contact); empathy_debug (DEBUG_DOMAIN, "Setting alias for contact %s (%d) to %s", @@ -1116,10 +1111,7 @@ empathy_tp_contact_factory_set_avatar (EmpathyTpContactFactory *tp_factory, EmpathyTpContactFactoryPriv *priv = GET_PRIV (tp_factory); g_return_if_fail (EMPATHY_IS_TP_CONTACT_FACTORY (tp_factory)); - - if (!priv->ready) { - return; - } + g_return_if_fail (priv->ready); if (data && size > 0 && size < G_MAXUINT) { GArray avatar; |