winhlp32: Better protect macros against not finding a help file.
This commit is contained in:
parent
862cc73fb4
commit
d3fd3d73be
|
@ -575,7 +575,7 @@ void CALLBACK MACRO_JumpContext(LPCSTR lpszPath, LPCSTR lpszWindow, LONG context
|
|||
HLPFILE* hlpfile;
|
||||
|
||||
WINE_TRACE("(\"%s\", \"%s\", %d)\n", lpszPath, lpszWindow, context);
|
||||
hlpfile = WINHELP_LookupHelpFile(lpszPath);
|
||||
if ((hlpfile = WINHELP_LookupHelpFile(lpszPath)))
|
||||
/* Some madness: what user calls 'context', hlpfile calls 'map' */
|
||||
WINHELP_OpenHelpWindow(HLPFILE_PageByMap, hlpfile, context,
|
||||
WINHELP_GetWindowInfo(hlpfile, lpszWindow),
|
||||
|
@ -591,6 +591,7 @@ void CALLBACK MACRO_JumpHash(LPCSTR lpszPath, LPCSTR lpszWindow, LONG lHash)
|
|||
hlpfile = MACRO_CurrentWindow()->page->file;
|
||||
else
|
||||
hlpfile = WINHELP_LookupHelpFile(lpszPath);
|
||||
if (hlpfile)
|
||||
WINHELP_OpenHelpWindow(HLPFILE_PageByHash, hlpfile, lHash,
|
||||
WINHELP_GetWindowInfo(hlpfile, lpszWindow),
|
||||
SW_NORMAL);
|
||||
|
|
Loading…
Reference in New Issue