Do not call ownerdraw for invalid items (empty focusrects).
Fixes Eudora 16bit empty Inbox problem.
diff --git a/controls/listbox.c b/controls/listbox.c
index 74b16eb..7b7fd71 100644
--- a/controls/listbox.c
+++ b/controls/listbox.c
@@ -453,6 +453,14 @@
DRAWITEMSTRUCT32 dis;
UINT32 id = (descr->lphc) ? ID_CB_LISTBOX : wnd->wIDmenu;
+ if (!item)
+ {
+ if (action == ODA_FOCUS)
+ DrawFocusRect32( hdc, rect );
+ else
+ FIXME(listbox,"called with an out of bounds index %d(%d) in owner draw, Not good.\n",index,descr->nb_items);
+ return;
+ }
dis.CtlType = ODT_LISTBOX;
dis.CtlID = id;
dis.hwndItem = wnd->hwndSelf;