Owen Rudge : winhlp32: Ensure win-> page is not NULL when selecting Help on Help.
Alexandre Julliard
julliard at winehq.org
Wed Jul 22 09:33:50 CDT 2009
Module: wine
Branch: master
Commit: b4f2c5528311782446be534db3ec04aeb86fa414
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b4f2c5528311782446be534db3ec04aeb86fa414
Author: Owen Rudge <owen at owenrudge.net>
Date: Wed Jul 22 00:48:28 2009 -0300
winhlp32: Ensure win->page is not NULL when selecting Help on Help.
---
programs/winhlp32/macro.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/programs/winhlp32/macro.c b/programs/winhlp32/macro.c
index c2fc3cc..fdec6b3 100644
--- a/programs/winhlp32/macro.c
+++ b/programs/winhlp32/macro.c
@@ -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";
More information about the wine-cvs
mailing list