Andrey Turkin : hhctrl.ocx:
Do not try to dereference NULL pointer if CreateHelpViewer failed.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu May 3 08:57:10 CDT 2007
Module: wine
Branch: master
Commit: 38acaccd931ecfd45d6f0f2515d985f257088131
URL: http://source.winehq.org/git/wine.git/?a=commit;h=38acaccd931ecfd45d6f0f2515d985f257088131
Author: Andrey Turkin <andrey.turkin at 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 */
}
More information about the wine-cvs
mailing list