hhctrl.ocx: Fix removing a window from the help list when window creation fails.
This commit is contained in:
parent
3ce21826c8
commit
aedcc11e4f
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue