mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 18:33:37 +00:00
winhlp32: Better protect macros against not finding a help file.
This commit is contained in:
parent
862cc73fb4
commit
d3fd3d73be
|
@ -575,11 +575,11 @@ 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);
|
||||
/* Some madness: what user calls 'context', hlpfile calls 'map' */
|
||||
WINHELP_OpenHelpWindow(HLPFILE_PageByMap, hlpfile, context,
|
||||
WINHELP_GetWindowInfo(hlpfile, lpszWindow),
|
||||
SW_NORMAL);
|
||||
if ((hlpfile = WINHELP_LookupHelpFile(lpszPath)))
|
||||
/* Some madness: what user calls 'context', hlpfile calls 'map' */
|
||||
WINHELP_OpenHelpWindow(HLPFILE_PageByMap, hlpfile, context,
|
||||
WINHELP_GetWindowInfo(hlpfile, lpszWindow),
|
||||
SW_NORMAL);
|
||||
}
|
||||
|
||||
void CALLBACK MACRO_JumpHash(LPCSTR lpszPath, LPCSTR lpszWindow, LONG lHash)
|
||||
|
@ -591,9 +591,10 @@ void CALLBACK MACRO_JumpHash(LPCSTR lpszPath, LPCSTR lpszWindow, LONG lHash)
|
|||
hlpfile = MACRO_CurrentWindow()->page->file;
|
||||
else
|
||||
hlpfile = WINHELP_LookupHelpFile(lpszPath);
|
||||
WINHELP_OpenHelpWindow(HLPFILE_PageByHash, hlpfile, lHash,
|
||||
WINHELP_GetWindowInfo(hlpfile, lpszWindow),
|
||||
SW_NORMAL);
|
||||
if (hlpfile)
|
||||
WINHELP_OpenHelpWindow(HLPFILE_PageByHash, hlpfile, lHash,
|
||||
WINHELP_GetWindowInfo(hlpfile, lpszWindow),
|
||||
SW_NORMAL);
|
||||
}
|
||||
|
||||
static void CALLBACK MACRO_JumpHelpOn(void)
|
||||
|
|
Loading…
Reference in a new issue