Commit aedcc11e authored by Erich Hoover's avatar Erich Hoover Committed by Alexandre Julliard

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

parent 3ce21826
...@@ -1825,13 +1825,12 @@ void ReleaseHelpViewer(HHInfo *info) ...@@ -1825,13 +1825,12 @@ void ReleaseHelpViewer(HHInfo *info)
HHInfo *CreateHelpViewer(HHInfo *info, LPCWSTR filename, HWND caller) HHInfo *CreateHelpViewer(HHInfo *info, LPCWSTR filename, HWND caller)
{ {
BOOL add_to_window_list = FALSE;
int i; int i;
if(!info) if(!info)
{ {
info = heap_alloc_zero(sizeof(HHInfo)); 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 /* Set the invalid tab ID (-1) as the default value for all
...@@ -1859,9 +1858,6 @@ HHInfo *CreateHelpViewer(HHInfo *info, LPCWSTR filename, HWND caller) ...@@ -1859,9 +1858,6 @@ HHInfo *CreateHelpViewer(HHInfo *info, LPCWSTR filename, HWND caller)
return NULL; return NULL;
} }
if(add_to_window_list)
list_add_tail(&window_list, &info->entry);
return info; return info;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment