user32: Don't access pConv after it's been freed.

This commit is contained in:
Huw Davies 2008-07-21 11:15:49 +01:00 committed by Alexandre Julliard
parent 9c29dbd987
commit bce23d7edb
1 changed files with 2 additions and 1 deletions

View File

@ -1658,9 +1658,10 @@ void WDML_RemoveServer(WDML_INSTANCE* pInstance, HSZ hszService, HSZ hszTopic)
pConvNext = pConv->next; pConvNext = pConv->next;
if (DdeCmpStringHandles(pConv->hszService, hszService) == 0) if (DdeCmpStringHandles(pConv->hszService, hszService) == 0)
{ {
HWND client = pConv->hwndClient, server = pConv->hwndServer;
WDML_RemoveConv(pConv, WDML_SERVER_SIDE); WDML_RemoveConv(pConv, WDML_SERVER_SIDE);
/* don't care about return code (whether client window is present or not) */ /* don't care about return code (whether client window is present or not) */
PostMessageW(pConv->hwndClient, WM_DDE_TERMINATE, (WPARAM)pConv->hwndServer, 0); PostMessageW(client, WM_DDE_TERMINATE, (WPARAM)server, 0);
} }
} }
if (pServer == pInstance->servers) if (pServer == pInstance->servers)