winhlp32: Ensure win->page is not NULL when selecting Help on Help.

This commit is contained in:
Owen Rudge 2009-07-22 00:48:28 -03:00 committed by Alexandre Julliard
parent 5e289b91c0
commit b4f2c55283
1 changed files with 5 additions and 2 deletions

View File

@ -446,10 +446,13 @@ static void CALLBACK MACRO_GotoMark(LPCSTR str)
void CALLBACK MACRO_HelpOn(void)
{
LPCSTR file;
WINHELP_WINDOW *win = MACRO_CurrentWindow();
LPCSTR file = NULL;
WINE_TRACE("()\n");
file = MACRO_CurrentWindow()->page->file->help_on_file;
if (win && win->page && win->page->file)
file = win->page->file->help_on_file;
if (!file)
file = (Globals.wVersion > 4) ? "winhlp32.hlp" : "winhelp.hlp";