Module: wine Branch: master Commit: 38acaccd931ecfd45d6f0f2515d985f257088131 URL: http://source.winehq.org/git/wine.git/?a=commit;h=38acaccd931ecfd45d6f0f2515...
Author: Andrey Turkin andrey.turkin@gmail.com Date: Wed May 2 20:16:32 2007 +0400
hhctrl.ocx: Do not try to dereference NULL pointer if CreateHelpViewer failed.
---
dlls/hhctrl.ocx/hhctrl.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/dlls/hhctrl.ocx/hhctrl.c b/dlls/hhctrl.ocx/hhctrl.c index f65f68b..958edf9 100644 --- a/dlls/hhctrl.ocx/hhctrl.c +++ b/dlls/hhctrl.ocx/hhctrl.c @@ -107,9 +107,12 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat
info = CreateHelpViewer(filename);
- res = NavigateToChm(info, info->pCHMInfo->szFile, info->WinType.pszFile); - if(!res) - ReleaseHelpViewer(info); + if (info) + { + res = NavigateToChm(info, info->pCHMInfo->szFile, info->WinType.pszFile); + if(!res) + ReleaseHelpViewer(info); + }
return NULL; /* FIXME */ }