forked from Mirrors/wine-wine
comctl32/listbox: Check for out of bounds using the index when painting the item.
Needed for LBS_NODATA. Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>stable
parent
1867b095a0
commit
98ece04660
|
@ -508,7 +508,7 @@ static void LISTBOX_PaintItem( LB_DESCR *descr, HDC hdc, const RECT *rect,
|
||||||
RECT r;
|
RECT r;
|
||||||
HRGN hrgn;
|
HRGN hrgn;
|
||||||
|
|
||||||
if (!item)
|
if (index >= descr->nb_items)
|
||||||
{
|
{
|
||||||
if (action == ODA_FOCUS)
|
if (action == ODA_FOCUS)
|
||||||
DrawFocusRect( hdc, rect );
|
DrawFocusRect( hdc, rect );
|
||||||
|
|
Loading…
Reference in New Issue