mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 08:54:05 +00:00
comctl32: Set reference data to zero on failure for GetWindowSubclass().
This commit is contained in:
parent
9b9fef2e11
commit
3aefc3a422
|
@ -1173,7 +1173,7 @@ BOOL WINAPI GetWindowSubclass (HWND hWnd, SUBCLASSPROC pfnSubclass,
|
|||
/* See if we have been called for this window */
|
||||
stack = GetPropW (hWnd, COMCTL32_wSubclass);
|
||||
if (!stack)
|
||||
return FALSE;
|
||||
goto done;
|
||||
|
||||
proc = stack->SubclassProcs;
|
||||
while (proc) {
|
||||
|
@ -1186,6 +1186,9 @@ BOOL WINAPI GetWindowSubclass (HWND hWnd, SUBCLASSPROC pfnSubclass,
|
|||
proc = proc->next;
|
||||
}
|
||||
|
||||
done:
|
||||
if (pdwRef)
|
||||
*pdwRef = 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -356,19 +356,16 @@ static void test_GetWindowSubclass(void)
|
|||
data = 0xdeadbeef;
|
||||
ret = pGetWindowSubclass(NULL, wnd_proc_sub, 2, &data);
|
||||
ok(!ret, "GetWindowSubclass succeeded.\n");
|
||||
todo_wine
|
||||
ok(data == 0, "Got unexpected data %#Ix.\n", data);
|
||||
|
||||
data = 0xdeadbeef;
|
||||
ret = pGetWindowSubclass(hwnd, NULL, 2, &data);
|
||||
ok(!ret, "GetWindowSubclass succeeded.\n");
|
||||
todo_wine
|
||||
ok(data == 0, "Got unexpected data %#Ix.\n", data);
|
||||
|
||||
data = 0xdeadbeef;
|
||||
ret = pGetWindowSubclass(hwnd, wnd_proc_sub, 0, &data);
|
||||
ok(!ret, "GetWindowSubclass succeeded.\n");
|
||||
todo_wine
|
||||
ok(data == 0, "Got unexpected data %#Ix.\n", data);
|
||||
|
||||
ret = pGetWindowSubclass(hwnd, wnd_proc_sub, 2, NULL);
|
||||
|
|
Loading…
Reference in a new issue