[Pkg-telepathy-commits] [telepathy-glib] 07/111: Account: don't crash if a CM returns a non-(ays) Avatar
Simon McVittie
smcv at debian.org
Wed Mar 19 18:07:22 UTC 2014
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch debian
in repository telepathy-glib.
commit e574b30a5e0b884838a6b04526528490dfc5ce91
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date: Thu Sep 26 14:22:25 2013 +0100
Account: don't crash if a CM returns a non-(ays) Avatar
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69849
Reviewed-by: Xavier Claessens <xavier.claessens at collabora.co.uk>
---
telepathy-glib/account.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/telepathy-glib/account.c b/telepathy-glib/account.c
index a342fd4..24dbd00 100644
--- a/telepathy-glib/account.c
+++ b/telepathy-glib/account.c
@@ -3559,6 +3559,12 @@ _tp_account_got_avatar_cb (TpProxy *proxy,
DEBUG ("Failed to get avatar: %s", error->message);
g_simple_async_result_set_from_error (result, error);
}
+ else if (!G_VALUE_HOLDS (out_Value, TP_STRUCT_TYPE_AVATAR))
+ {
+ DEBUG ("Avatar had wrong type: %s", G_VALUE_TYPE_NAME (out_Value));
+ g_simple_async_result_set_error (result, TP_ERROR, TP_ERROR_CONFUSED,
+ "Incorrect type for Avatar property");
+ }
else
{
avatar = g_value_get_boxed (out_Value);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-telepathy/telepathy-glib.git
More information about the Pkg-telepathy-commits
mailing list