Commit efa04011 authored by Tijl Coosemans's avatar Tijl Coosemans Committed by Alexandre Julliard

hhctrl: Fix NULL pointer dereference in some failure cases.

parent 9cce7898
......@@ -123,14 +123,17 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat
}
info = CreateHelpViewer(filename);
if(!info)
return NULL;
if(!index)
index = info->WinType.pszFile;
if (info)
res = NavigateToChm(info, info->pCHMInfo->szFile, index);
if(!res)
{
if (!index)
index = info->WinType.pszFile;
res = NavigateToChm(info, info->pCHMInfo->szFile, index);
if(!res)
ReleaseHelpViewer(info);
ReleaseHelpViewer(info);
return NULL;
}
return info->WinType.hwndHelp;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment