[COMCTL32] Add NULL checks to SetWindowSubclass.

Imports Wine commit 04847e68f87 by Sven Baars.

Fixes crash in comctl32_winetest:subclass.
This commit is contained in:
Thomas Faber 2019-02-03 16:41:29 +01:00
parent 7246909a80
commit 3445129dd3
No known key found for this signature in database
GPG key ID: 076E7C3D44720826

View file

@ -1266,6 +1266,9 @@ BOOL WINAPI SetWindowSubclass (HWND hWnd, SUBCLASSPROC pfnSubclass,
TRACE ("(%p, %p, %lx, %lx)\n", hWnd, pfnSubclass, uIDSubclass, dwRef);
if (!hWnd || !pfnSubclass)
return FALSE;
/* Since the window procedure that we set here has two additional arguments,
* we can't simply set it as the new window procedure of the window. So we
* set our own window procedure and then calculate the other two arguments