From 38acaccd931ecfd45d6f0f2515d985f257088131 Mon Sep 17 00:00:00 2001 From: Andrey Turkin Date: Wed, 2 May 2007 20:16:32 +0400 Subject: [PATCH] hhctrl.ocx: Do not try to dereference NULL pointer if CreateHelpViewer failed. --- dlls/hhctrl.ocx/hhctrl.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dlls/hhctrl.ocx/hhctrl.c b/dlls/hhctrl.ocx/hhctrl.c index f65f68bfff1..958edf93fb1 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 */ } -- 2.11.4.GIT