Commit 385b8dcb authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

user32/sysparams: Return NULL from GetSysColorBrush() for invalid index.

parent 697955c9
......@@ -3028,7 +3028,7 @@ HBRUSH WINAPI GetSysColorBrush( INT index )
{
if (0 <= index && index < NUM_SYS_COLORS) return SysColorBrushes[index];
WARN("Unknown index(%d)\n", index );
return GetStockObject(LTGRAY_BRUSH);
return NULL;
}
......
......@@ -2770,7 +2770,7 @@ static void test_GetSysColorBrush(void)
SetLastError(0xdeadbeef);
hbr = GetSysColorBrush(-1);
todo_wine ok(hbr == NULL, "Expected NULL brush\n");
ok(hbr == NULL, "Expected NULL brush\n");
ok(GetLastError() == 0xdeadbeef, "Expected last error not set, got %x\n", GetLastError());
/* greater than max index */
hbr = GetSysColorBrush(COLOR_MENUBAR);
......@@ -2778,7 +2778,7 @@ static void test_GetSysColorBrush(void)
{
SetLastError(0xdeadbeef);
hbr = GetSysColorBrush(COLOR_MENUBAR + 1);
todo_wine ok(hbr == NULL, "Expected NULL brush\n");
ok(hbr == NULL, "Expected NULL brush\n");
ok(GetLastError() == 0xdeadbeef, "Expected last error not set, got %x\n", GetLastError());
}
else
......
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