hhctrl.ocx: Fix removing a window from the help list when window creation fails.

This commit is contained in:
Erich Hoover 2012-10-03 09:18:52 -06:00 committed by Alexandre Julliard
parent 3ce21826c8
commit aedcc11e4f
1 changed files with 1 additions and 5 deletions

View File

@ -1825,13 +1825,12 @@ void ReleaseHelpViewer(HHInfo *info)
HHInfo *CreateHelpViewer(HHInfo *info, LPCWSTR filename, HWND caller)
{
BOOL add_to_window_list = FALSE;
int i;
if(!info)
{
info = heap_alloc_zero(sizeof(HHInfo));
add_to_window_list = TRUE;
list_add_tail(&window_list, &info->entry);
}
/* Set the invalid tab ID (-1) as the default value for all
@ -1859,9 +1858,6 @@ HHInfo *CreateHelpViewer(HHInfo *info, LPCWSTR filename, HWND caller)
return NULL;
}
if(add_to_window_list)
list_add_tail(&window_list, &info->entry);
return info;
}