[PATCH v2 1/5] comctl32/listbox: Check for out of bounds using the index when painting the item
Gabriel Ivăncescu
gabrielopcode at gmail.com
Thu Feb 7 07:12:20 CST 2019
Needed for LBS_NODATA.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
---
dlls/comctl32/listbox.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/comctl32/listbox.c b/dlls/comctl32/listbox.c
index cb645b4..9e6d8ea 100644
--- a/dlls/comctl32/listbox.c
+++ b/dlls/comctl32/listbox.c
@@ -508,7 +508,7 @@ static void LISTBOX_PaintItem( LB_DESCR *descr, HDC hdc, const RECT *rect,
RECT r;
HRGN hrgn;
- if (!item)
+ if (index >= descr->nb_items)
{
if (action == ODA_FOCUS)
DrawFocusRect( hdc, rect );
--
2.19.1
More information about the wine-devel
mailing list