hhctrl.ocx: Do not try to dereference NULL pointer if CreateHelpViewer failed.

oldstable
Andrey Turkin 2007-05-02 20:16:32 +04:00 committed by Alexandre Julliard
parent 41342a32bb
commit 38acaccd93
1 changed files with 6 additions and 3 deletions

View File

@ -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 */
}