user32/sysparams: Return NULL from GetSysColorBrush() for invalid index.
This commit is contained in:
parent
697955c922
commit
385b8dcb95
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue