diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2013-09-26 14:22:25 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2013-09-26 16:31:24 +0100 |
commit | bf13f5c477d4963e6231feefde58099e72cfb4f5 (patch) | |
tree | 116f93907c420be81884f52170f0077e8f6edf9a | |
parent | 267bbbb6fe16b5d0e30f1dc446d93d9f833bc918 (diff) | |
download | telepathy-glib-bf13f5c477d4963e6231feefde58099e72cfb4f5.tar.gz |
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@collabora.co.uk>
-rw-r--r-- | telepathy-glib/account.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/telepathy-glib/account.c b/telepathy-glib/account.c index 04b25a530..9aac94a7b 100644 --- a/telepathy-glib/account.c +++ b/telepathy-glib/account.c @@ -3482,6 +3482,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); |