# HG changeset patch # User Mark Doliner # Date 1226609980 0 # Node ID b44e1bbd5b4a7e4c5c443375f02d9d587b65fe67 # Parent 9d2ae363907901a098e45ec28178d033b3b98a8d Attempt to avoid a crash in MSN. See the comment in the code. Our MSN custom emoticon code is crashy, by the way. Basically I think the slp/slplink/slpcall/switchboard code is buggy. I think there are a lot of cross-references and they don't all clean up after themselves correctly. But I don't understand this code well enough to improve it. diff -r 9d2ae3639079 -r b44e1bbd5b4a libpurple/protocols/msn/slp.c --- a/libpurple/protocols/msn/slp.c Thu Nov 13 19:11:19 2008 +0000 +++ b/libpurple/protocols/msn/slp.c Thu Nov 13 20:59:40 2008 +0000 @@ -847,7 +847,17 @@ sha1 = msn_object_get_sha1(obj); slplink = msn_session_get_slplink(session, who); - slplink->swboard = swboard; + if (slplink->swboard != swboard) { + if (slplink->swboard != NULL) + /* + * Apparently we're using a different switchboard now or + * something? I don't know if this is normal, but it + * definitely happens. So make sure the old switchboard + * doesn't still have a reference to us. + */ + slplink->swboard->slplinks = g_list_remove(slplink->swboard->slplinks, slplink); + slplink->swboard = swboard; + } /* If the conversation doesn't exist then this is a custom smiley * used in the first message in a MSN conversation: we need to create