mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-15 02:19:47 +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;
|
HLPFILE* hlpfile;
|
||||||
|
|
||||||
WINE_TRACE("(\"%s\", \"%s\", %d)\n", lpszPath, lpszWindow, context);
|
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' */
|
/* Some madness: what user calls 'context', hlpfile calls 'map' */
|
||||||
WINHELP_OpenHelpWindow(HLPFILE_PageByMap, hlpfile, context,
|
WINHELP_OpenHelpWindow(HLPFILE_PageByMap, hlpfile, context,
|
||||||
WINHELP_GetWindowInfo(hlpfile, lpszWindow),
|
WINHELP_GetWindowInfo(hlpfile, lpszWindow),
|
||||||
SW_NORMAL);
|
SW_NORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CALLBACK MACRO_JumpHash(LPCSTR lpszPath, LPCSTR lpszWindow, LONG lHash)
|
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;
|
hlpfile = MACRO_CurrentWindow()->page->file;
|
||||||
else
|
else
|
||||||
hlpfile = WINHELP_LookupHelpFile(lpszPath);
|
hlpfile = WINHELP_LookupHelpFile(lpszPath);
|
||||||
WINHELP_OpenHelpWindow(HLPFILE_PageByHash, hlpfile, lHash,
|
if (hlpfile)
|
||||||
WINHELP_GetWindowInfo(hlpfile, lpszWindow),
|
WINHELP_OpenHelpWindow(HLPFILE_PageByHash, hlpfile, lHash,
|
||||||
SW_NORMAL);
|
WINHELP_GetWindowInfo(hlpfile, lpszWindow),
|
||||||
|
SW_NORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void CALLBACK MACRO_JumpHelpOn(void)
|
static void CALLBACK MACRO_JumpHelpOn(void)
|
||||||
|
|
Loading…
Reference in a new issue