hhctrl.ocx: Check the filename param before dereferencing it.

This commit is contained in:
James Hawkins 2008-05-20 00:40:27 -05:00 committed by Alexandre Julliard
parent 70cd6bfbbd
commit 9f42e8eb63
1 changed files with 6 additions and 0 deletions

View File

@ -108,6 +108,9 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat
FIXME("Not all HH cases handled correctly\n");
if (!filename)
return NULL;
index = strstrW(filename, delimW);
if (index)
{
@ -141,6 +144,9 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat
HHInfo *info;
LPWSTR url;
if (!filename)
return NULL;
info = CreateHelpViewer(filename);
if(!info)
return NULL;