From 035a187c425b59f0239c904a71a63a50c2b02ccd Mon Sep 17 00:00:00 2001 From: Megamouse Date: Sat, 24 Apr 2021 22:52:16 +0200 Subject: [PATCH] user-overlays: add sanity check for enter button --- rpcs3/Emu/RSX/Overlays/overlay_user_list_dialog.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rpcs3/Emu/RSX/Overlays/overlay_user_list_dialog.cpp b/rpcs3/Emu/RSX/Overlays/overlay_user_list_dialog.cpp index 11e19b8f8a..86a05fedfb 100644 --- a/rpcs3/Emu/RSX/Overlays/overlay_user_list_dialog.cpp +++ b/rpcs3/Emu/RSX/Overlays/overlay_user_list_dialog.cpp @@ -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(m_list->get_selected_index()); index < m_entry_ids.size()) { return_code = static_cast(m_entry_ids[index]);