http://git.etersoft.ru/projects
/
wine
/
eterwine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9cce789
)
hhctrl: Fix NULL pointer dereference in some failure cases.
author
Tijl Coosemans
<tijl@ulyssis.org>
Mon, 28 Apr 2008 20:41:47 +0000
(22:41 +0200)
committer
Alexandre Julliard
<julliard@winehq.org>
Tue, 29 Apr 2008 11:48:30 +0000
(13:48 +0200)
dlls/hhctrl.ocx/hhctrl.c
patch
|
blob
|
blame
|
history
diff --git
a/dlls/hhctrl.ocx/hhctrl.c
b/dlls/hhctrl.ocx/hhctrl.c
index e663c11803838a70dfbc8df06e0f8a723d549ac2..a555a42763d26f472542c0370f4e1cfa5aaf8f15 100644
(file)
--- a/
dlls/hhctrl.ocx/hhctrl.c
+++ b/
dlls/hhctrl.ocx/hhctrl.c
@@
-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;
}