mirror of
https://github.com/RetroDECK/org.mamedev.MAME.git
synced 2025-01-19 11:05:37 +00:00
Patch for std::vector asserts found in testing
This commit is contained in:
parent
a95c2c1f1b
commit
52f1dccd5a
26
0.245-asserts.patch
Normal file
26
0.245-asserts.patch
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
diff --git a/src/frontend/mame/ui/selgame.cpp b/src/frontend/mame/ui/selgame.cpp
|
||||||
|
index 07b8d03d043..bcdd49239cc 100644
|
||||||
|
--- a/src/frontend/mame/ui/selgame.cpp
|
||||||
|
+++ b/src/frontend/mame/ui/selgame.cpp
|
||||||
|
@@ -442,7 +442,7 @@ void menu_select_game::populate(float &customtop, float &custombottom)
|
||||||
|
item_append(_("System Settings"), 0, (void *)(uintptr_t)CONF_MACHINE);
|
||||||
|
skip_main_items = 3;
|
||||||
|
|
||||||
|
- if (m_prev_selected && !have_prev_selected)
|
||||||
|
+ if (m_prev_selected && !have_prev_selected && item_count() > 0)
|
||||||
|
m_prev_selected = item(0).ref();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
diff --git a/src/frontend/mame/ui/selsoft.cpp b/src/frontend/mame/ui/selsoft.cpp
|
||||||
|
index da4ad722f2f..051b09b4fcf 100644
|
||||||
|
--- a/src/frontend/mame/ui/selsoft.cpp
|
||||||
|
+++ b/src/frontend/mame/ui/selsoft.cpp
|
||||||
|
@@ -397,7 +397,7 @@ menu_select_software::~menu_select_software()
|
||||||
|
|
||||||
|
void menu_select_software::handle(event const *ev)
|
||||||
|
{
|
||||||
|
- if (m_prev_selected == nullptr)
|
||||||
|
+ if (m_prev_selected == nullptr && item_count() > 0)
|
||||||
|
m_prev_selected = item(0).ref();
|
||||||
|
|
||||||
|
// FIXME: everything above here used run before events were processed
|
|
@ -57,3 +57,5 @@ modules:
|
||||||
path: use-system-lib-flac.patch
|
path: use-system-lib-flac.patch
|
||||||
- type: patch
|
- type: patch
|
||||||
path: ldopts.patch
|
path: ldopts.patch
|
||||||
|
- type: patch
|
||||||
|
path: 0.245-asserts.patch
|
||||||
|
|
Loading…
Reference in a new issue