user-overlays: add sanity check for enter button

This commit is contained in:
Megamouse 2021-04-24 22:52:16 +02:00
parent 3c37036f7a
commit 035a187c42

View File

@ -87,6 +87,9 @@ namespace rsx
switch (button_press)
{
case pad_button::cross:
if (m_list->m_items.empty())
break;
if (const usz index = static_cast<usz>(m_list->get_selected_index()); index < m_entry_ids.size())
{
return_code = static_cast<s32>(m_entry_ids[index]);