comctl32/tests: Prevent a possible nullptr dereference.

Signed-off-by: Mark Jansen <mark.jansen@reactos.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Mark Jansen 2018-03-16 22:57:15 +01:00 committed by Alexandre Julliard
parent df408ba3ab
commit f94d0e7b3a
1 changed files with 2 additions and 2 deletions

View File

@ -2047,9 +2047,9 @@ static void check_color_table(const char *name, HDC hdc, HIMAGELIST himl, UINT i
ok((bmi->bmiColors[i].rgbRed == expect[i].rgbRed &&
bmi->bmiColors[i].rgbGreen == expect[i].rgbGreen &&
bmi->bmiColors[i].rgbBlue == expect[i].rgbBlue) ||
broken(bmi->bmiColors[i].rgbRed == broken_expect[i].rgbRed &&
(broken_expect && broken(bmi->bmiColors[i].rgbRed == broken_expect[i].rgbRed &&
bmi->bmiColors[i].rgbGreen == broken_expect[i].rgbGreen &&
bmi->bmiColors[i].rgbBlue == broken_expect[i].rgbBlue),
bmi->bmiColors[i].rgbBlue == broken_expect[i].rgbBlue)),
"%d: %s: got color[%d] %02x %02x %02x expect %02x %02x %02x\n", depth, name, i,
bmi->bmiColors[i].rgbRed, bmi->bmiColors[i].rgbGreen, bmi->bmiColors[i].rgbBlue,
expect[i].rgbRed, expect[i].rgbGreen, expect[i].rgbBlue);