summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend
diff options
context:
space:
mode:
author jflatt <jflatt@cox.net>2022-06-24 17:22:46 -0700
committer GitHub <noreply@github.com>2022-06-25 10:22:46 +1000
commita8b6bdfcacdc349bf0d6498540e83a99f79eeb48 (patch)
treee7c82abbac19346fd4f9554af8e8b9a0224be472 /src/frontend
parentdb6590cb110cb42079258ad5979dac08666a7ab0 (diff)
ui/selgame.cpp: Avoid assert in std::vector when no items in menu. (#9978)
Diffstat (limited to 'src/frontend')
-rw-r--r--src/frontend/mame/ui/selgame.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/frontend/mame/ui/selgame.cpp b/src/frontend/mame/ui/selgame.cpp
index cfb41d2c3b9..07b8d03d043 100644
--- a/src/frontend/mame/ui/selgame.cpp
+++ b/src/frontend/mame/ui/selgame.cpp
@@ -164,7 +164,7 @@ void menu_select_game::menu_activated()
void menu_select_game::handle(event const *ev)
{
- if (!m_prev_selected)
+ if (!m_prev_selected && item_count() > 0)
m_prev_selected = item(0).ref();
// if I have to select software, force software list submenu