mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 12:19:49 +00:00
winhelp: Avoid accessing a window in global window list after it has been freed.
This commit is contained in:
parent
2d20a1aa53
commit
3b07c851f8
1 changed files with 10 additions and 2 deletions
|
@ -281,24 +281,32 @@ static void CALLBACK MACRO_CheckItem(LPCSTR str)
|
|||
static void CALLBACK MACRO_CloseSecondarys(void)
|
||||
{
|
||||
WINHELP_WINDOW *win;
|
||||
WINHELP_WINDOW *next;
|
||||
|
||||
WINE_TRACE("()\n");
|
||||
for (win = Globals.win_list; win; win = win->next)
|
||||
for (win = Globals.win_list; win; win = next)
|
||||
{
|
||||
next = win->next;
|
||||
if (lstrcmpi(win->info->name, "main"))
|
||||
WINHELP_ReleaseWindow(win);
|
||||
}
|
||||
}
|
||||
|
||||
static void CALLBACK MACRO_CloseWindow(LPCSTR lpszWindow)
|
||||
{
|
||||
WINHELP_WINDOW *win;
|
||||
WINHELP_WINDOW *next;
|
||||
|
||||
WINE_TRACE("(\"%s\")\n", lpszWindow);
|
||||
|
||||
if (!lpszWindow || !lpszWindow[0]) lpszWindow = "main";
|
||||
|
||||
for (win = Globals.win_list; win; win = win->next)
|
||||
for (win = Globals.win_list; win; win = next)
|
||||
{
|
||||
next = win->next;
|
||||
if (!lstrcmpi(win->info->name, lpszWindow))
|
||||
WINHELP_ReleaseWindow(win);
|
||||
}
|
||||
}
|
||||
|
||||
static void CALLBACK MACRO_Compare(LPCSTR str)
|
||||
|
|
Loading…
Reference in a new issue