pidgin: 8e3ba482: Oh, we need to make sure the buddy is on...
markdoliner at pidgin.im
markdoliner at pidgin.im
Thu Feb 4 21:40:37 EST 2010
-----------------------------------------------------------------
Revision: 8e3ba482663ce8fdf038560ed6f457899db691b4
Ancestor: aae62ae30264b5fccd08bf437228c6c2339bd1c5
Author: markdoliner at pidgin.im
Date: 2010-02-05T02:36:30
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/8e3ba482663ce8fdf038560ed6f457899db691b4
Modified files:
libpurple/protocols/myspace/myspace.c
ChangeLog:
Oh, we need to make sure the buddy is on our protocol before trying to
free their data.
-------------- next part --------------
============================================================
--- libpurple/protocols/myspace/myspace.c 5d634622111bd89b46f48173bf829421e4c659e4
+++ libpurple/protocols/myspace/myspace.c 296274819882a50fcb3d2bd207ddc9fbe8c8bc7a
@@ -2254,9 +2254,16 @@ msim_close(PurpleConnection *gc)
static void
msim_close(PurpleConnection *gc)
{
+ PurpleAccount *account;
GSList *buddies;
MsimSession *session;
+ if (gc == NULL) {
+ return;
+ }
+
+ account = purple_connection_get_account(gc);
+
/*
* Free our protocol-specific buddy data. It almost seems like libpurple
* should call our buddy_free prpl callback so that we don't need to do
@@ -2264,12 +2271,12 @@ msim_close(PurpleConnection *gc)
*/
buddies = purple_blist_get_buddies();
while (buddies != NULL) {
- msim_buddy_free(buddies->data);
- buddies = g_slist_delete_link(buddies, buddies);
- }
+ PurpleBuddy *buddy = buddies->data;
- if (gc == NULL) {
- return;
+ if (purple_buddy_get_account(buddy) == account)
+ msim_buddy_free(buddy);
+
+ buddies = g_slist_delete_link(buddies, buddies);
}
session = (MsimSession *)gc->proto_data;
More information about the Commits
mailing list