soc.2009.telepathy: 58173bda: Added parameter checks to telepathy_avat...
sttwister at gmail.com
sttwister at gmail.com
Thu Oct 15 15:55:35 EDT 2009
-----------------------------------------------------------------
Revision: 58173bda0a3ad3e5c85b0db9966100468e0a66b5
Ancestor: fc1d5406b89fd2cbb0ae5151939178000a7f3784
Author: sttwister at gmail.com
Date: 2009-10-14T17:39:43
Branch: im.pidgin.soc.2009.telepathy
URL: http://d.pidgin.im/viewmtn/revision/info/58173bda0a3ad3e5c85b0db9966100468e0a66b5
Modified files:
libpurple/protocols/telepathy/telepathy_avatar.c
ChangeLog:
Added parameter checks to telepathy_avatar.c
-------------- next part --------------
============================================================
--- libpurple/protocols/telepathy/telepathy_avatar.c 6a08d5a4223a085f8ea5d498c8bc3feba5f37835
+++ libpurple/protocols/telepathy/telepathy_avatar.c 9b2ff70180f42615fb6117c297bb24320f3e7674
@@ -51,6 +51,8 @@ get_known_avatar_tokens_cb (TpConnection
guint handle;
gchar *token;
+ g_return_if_fail(user_data != NULL);
+
if (error != NULL)
{
purple_debug_error("telepathy", "GetAvatarTokens error: %s\n", error->message);
@@ -130,6 +132,8 @@ avatar_retrieved_cb (TpConnection *proxy
TpContact *contact;
gpointer avatar;
+ g_return_if_fail(user_data != NULL);
+
if (contact_data == NULL)
{
purple_debug_warning("telepathy", "Updated avatar for handle %u which has no contact_data struct cached!\n", arg_Contact);
@@ -164,8 +168,10 @@ avatar_updated_cb (TpConnection *proxy,
PurpleBuddy *buddy;
PurpleBuddyIcon *icon;
- purple_debug_warning("telepathy", "Avatar token updated for %u: (%s)\n", arg_Contact, arg_New_Avatar_Token);
+ g_return_if_fail(user_data != NULL);
+ purple_debug_info("telepathy", "Avatar token updated for %u: (%s)\n", arg_Contact, arg_New_Avatar_Token);
+
if (contact_data == NULL)
{
purple_debug_warning("telepathy", "Updated avatar for handle %u which has no contact_data struct cached!\n", arg_Contact);
@@ -234,6 +240,8 @@ get_avatar_properties_cb (TpProxy *proxy
PurpleBuddyIconSpec icon_spec = NO_BUDDY_ICONS;
icon_spec.scale_rules = PURPLE_ICON_SCALE_SEND;
+ g_return_if_fail(user_data != NULL);
+
if (error != NULL)
{
purple_debug_error("telepathy", "Error getting avatar properties: %s\n", error->message);
More information about the Commits
mailing list