hhctrl: Fix NULL pointer dereference in some failure cases.
This commit is contained in:
parent
9cce789881
commit
efa040119b
|
@ -123,14 +123,17 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat
|
|||
}
|
||||
|
||||
info = CreateHelpViewer(filename);
|
||||
if(!info)
|
||||
return NULL;
|
||||
|
||||
if (info)
|
||||
if(!index)
|
||||
index = info->WinType.pszFile;
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue