Check for failed allocations. Spotted by Martin Bealby.

svn path=/trunk/; revision=20118
This commit is contained in:
Filip Navara 2005-12-12 20:49:35 +00:00
parent f59f8f34e3
commit d85330a92a

View file

@ -107,6 +107,8 @@ WinHelpA(HWND hWnd, LPCSTR lpszHelp, UINT uCommand, DWORD dwData)
nlen = 0;
size = sizeof(WINHELP) + nlen + dsize;
hwh = GlobalAlloc(0,size);
if (hwh == NULL)
return FALSE;
lpwh = GlobalLock(hwh);
lpwh->size = size;
lpwh->command = uCommand;