# HG changeset patch # User Evan Schoenberg # Date 1213470767 0 # Node ID 98594354b423011fc9d2f4eeab503a42462fea26 # Parent ef4dbd2bb696c34e6d1d5378ab1650cae2e631ad Don't cycle through a NULL "message" when purple_parse_oncoming() is called for an away oscar buddy. purple_got_infoblock() will supply a message as appropriate. diff -r ef4dbd2bb696 -r 98594354b423 libpurple/protocols/oscar/oscar.c --- a/libpurple/protocols/oscar/oscar.c Sat Jun 14 04:50:35 2008 +0000 +++ b/libpurple/protocols/oscar/oscar.c Sat Jun 14 19:12:47 2008 +0000 @@ -1977,7 +1977,17 @@ } else { - purple_prpl_got_user_status(account, info->sn, status_id, NULL); + PurpleBuddy *b = purple_find_buddy(account, info->sn); + PurplePresence *presence = purple_buddy_get_presence(b); + PurpleStatus *old_status = purple_presence_get_active_status(presence); + PurpleStatus *new_status = purple_presence_get_status(presence, status_id); + + /* If our status_id would change with this update, pass it to the core. + * However, if our status_id would not change, do nothing; as we would clear out any existing + * attributes on the status prematurely. purple_got_infoblock() will update the message as needed. + */ + if (old_status != new_status) + purple_prpl_got_user_status(account, info->sn, status_id, NULL); } /* Login time stuff */