Mercurial > pidgin
comparison libpurple/protocols/msn/slp.c @ 24409:b44e1bbd5b4a
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.
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 13 Nov 2008 20:59:40 +0000 |
parents | e71c1fad229f |
children | 809de3ab85d1 |
comparison
equal
deleted
inserted
replaced
24408:9d2ae3639079 | 24409:b44e1bbd5b4a |
---|---|
845 | 845 |
846 who = msn_object_get_creator(obj); | 846 who = msn_object_get_creator(obj); |
847 sha1 = msn_object_get_sha1(obj); | 847 sha1 = msn_object_get_sha1(obj); |
848 | 848 |
849 slplink = msn_session_get_slplink(session, who); | 849 slplink = msn_session_get_slplink(session, who); |
850 slplink->swboard = swboard; | 850 if (slplink->swboard != swboard) { |
851 if (slplink->swboard != NULL) | |
852 /* | |
853 * Apparently we're using a different switchboard now or | |
854 * something? I don't know if this is normal, but it | |
855 * definitely happens. So make sure the old switchboard | |
856 * doesn't still have a reference to us. | |
857 */ | |
858 slplink->swboard->slplinks = g_list_remove(slplink->swboard->slplinks, slplink); | |
859 slplink->swboard = swboard; | |
860 } | |
851 | 861 |
852 /* If the conversation doesn't exist then this is a custom smiley | 862 /* If the conversation doesn't exist then this is a custom smiley |
853 * used in the first message in a MSN conversation: we need to create | 863 * used in the first message in a MSN conversation: we need to create |
854 * the conversation now, otherwise the custom smiley won't be shown. | 864 * the conversation now, otherwise the custom smiley won't be shown. |
855 * This happens because every GtkIMHtml has its own smiley tree: if | 865 * This happens because every GtkIMHtml has its own smiley tree: if |