Commit 3aefc3a4 authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

comctl32: Set reference data to zero on failure for GetWindowSubclass().

parent 9b9fef2e
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment