diff --git a/controls/listbox.c b/controls/listbox.c index a298ff9989e41a49128c78f05e2c3dbf3cc26637..736922ad2e9593e26ba6729228366ffb0f97d567 100644 --- a/controls/listbox.c +++ b/controls/listbox.c @@ -2229,6 +2229,9 @@ LRESULT WINAPI ListBoxWndProc( HWND hwnd, UINT msg, case LB_GETCURSEL16: case LB_GETCURSEL: retvalue = descr->selected_item; + if (retvalue == -1) retvalue = descr->focus_item; + /* otherwise, if the user tries to move the selection with the */ + /* arrow keys, we will give the application something to choke on */ goto END; case LB_GETTOPINDEX16: