org.mamedev.MAME/0.244-selgame-assert-when-zero.patch
2022-06-28 12:52:51 -07:00

14 lines
473 B
Diff

diff --git a/src/frontend/mame/ui/selgame.cpp b/src/frontend/mame/ui/selgame.cpp
index abda7047..89642d88 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