Fixes an out of bounds access in `show_popup`.
```c
if (menu->FocusedItem != NO_SELECTED_ITEM)
{
menu->items[menu->FocusedItem].fState &= ~(MF_HILITE|MF_MOUSESELECT); // <- can crash here
menu->FocusedItem = NO_SELECTED_ITEM;
}
```
Menu resets focused item on show, not on close.
If items were later deleted, next time user opens the menu, menu can crash on out of bounds access and won't show up again, as menu thinks it's still on screen.
In other words:
- open split button dropdown
- click on any item
- clear dropdown items
- open dropdown again
Menu borked and won't open again.
Source for the testing app for reproduction.
[test.c](/uploads/2f703f63891b33e1a0eb0fcd27c912b7/test.c)
I guess, the alternative is to reset focused item when menu is closed, but not sure where's the best place to do that, haven't dug deep enough.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1554