user32/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>
This commit is contained in:
parent
f72f8e5c40
commit
ea185314b3
|
@ -533,7 +533,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