soc.2009.vulture: 2d23aff5: Fix some potential sync problems.
gdick at soc.pidgin.im
gdick at soc.pidgin.im
Wed Jul 1 19:55:38 EDT 2009
-----------------------------------------------------------------
Revision: 2d23aff53f2376d6741362fcfc4a9eb8cd4b7242
Ancestor: 1c3a0415d676084c623d12c2e6454f3b1a0f0974
Author: gdick at soc.pidgin.im
Date: 2009-07-01T14:13:21
Branch: im.pidgin.soc.2009.vulture
URL: http://d.pidgin.im/viewmtn/revision/info/2d23aff53f2376d6741362fcfc4a9eb8cd4b7242
Modified files:
vulture/purpleblist.c vulture/purpleconv.c
ChangeLog:
Fix some potential sync problems.
-------------- next part --------------
============================================================
--- vulture/purpleblist.c be2723a66ead46fea82a18710a4c929d20d371e3
+++ vulture/purpleblist.c a52e8a43bf3e4d8db45746d170786b02d79d1486
@@ -197,6 +197,9 @@ void PurpleBlistRemoveNode(PurpleBuddyLi
if(!lpblistnode)
return;
+ /* This pointer is about to become invalid. */
+ ((VULTURE_BLIST_NODE*)lpblistnode->ui_data)->lpblistnode = NULL;
+
VultureBListNodeRelease((VULTURE_BLIST_NODE*)lpblistnode->ui_data);
}
@@ -230,7 +233,8 @@ void PurpleBListNodeDoubleClicked(VULTUR
*/
void PurpleBListNodeDoubleClicked(VULTURE_BLIST_NODE *lpvbn)
{
- if(PURPLE_BLIST_NODE_IS_CONTACT(lpvbn->lpblistnode) || PURPLE_BLIST_NODE_IS_BUDDY(lpvbn->lpblistnode))
+ if(lpvbn->lpblistnode &&
+ (PURPLE_BLIST_NODE_IS_CONTACT(lpvbn->lpblistnode) || PURPLE_BLIST_NODE_IS_BUDDY(lpvbn->lpblistnode)))
{
PurpleBuddy *lpbuddy;
@@ -254,7 +258,7 @@ LPTSTR PurpleBuddyGetStatusText(PurpleBu
PurplePlugin *lppluginPrpl;
/* Find prpl for buddy. */
- if((lppluginPrpl = purple_find_prpl(purple_account_get_protocol_id(lpbuddy->account))))
+ if(lpbuddy && (lppluginPrpl = purple_find_prpl(purple_account_get_protocol_id(lpbuddy->account))))
{
PurplePluginProtocolInfo *lpprplinfo = PURPLE_PLUGIN_PROTOCOL_INFO(lppluginPrpl);
============================================================
--- vulture/purpleconv.c 5a2cc55104ce3db91c5d8939de31401188d60a3f
+++ vulture/purpleconv.c 2d017fc18e51e06137849b2db68553fcfd88b3f7
@@ -81,6 +81,9 @@ void PurpleDestroyConversation(PurpleCon
*/
void PurpleDestroyConversation(PurpleConversation *lpconv)
{
+ /* This pointer is about to become invalid. */
+ ((VULTURE_CONVERSATION*)lpconv->ui_data)->lpconv = NULL;
+
VulturePostUIMessage(g_hwndMain, VUIMSG_DESTROYEDCONVERSATION, (VULTURE_CONVERSATION*)lpconv->ui_data);
}
More information about the Commits
mailing list