mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[COMCTL32] Add NULL checks to SetWindowSubclass.
Imports Wine commit 04847e68f87 by Sven Baars. Fixes crash in comctl32_winetest:subclass.
This commit is contained in:
parent
7246909a80
commit
3445129dd3
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue