From 02f39608f22896ec76a1e26720a1d0f3fd0862b7 Mon Sep 17 00:00:00 2001 From: smf- Date: Mon, 21 Oct 2019 08:37:14 +0100 Subject: [PATCH] ref count in flight calls, fixes MT07456 [O. Galibert, smf] --- src/emu/emumem_heu.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/emu/emumem_heu.cpp b/src/emu/emumem_heu.cpp index 8a62d8aa5e2..51a51a70d6d 100644 --- a/src/emu/emumem_heu.cpp +++ b/src/emu/emumem_heu.cpp @@ -62,6 +62,8 @@ template void handler_entry_read_units typename emu::detail::handler_entry_size::uX handler_entry_read_units::read(offs_t offset, uX mem_mask) { + ref(); + uX result = m_unmap; for (int index = 0; index < m_subunits; index++) { const subunit_info &si = m_subunit_infos[index]; @@ -91,6 +93,8 @@ template typename emu::detail::handler_ent } } } + + unref(); return result; } @@ -173,6 +177,8 @@ template void handler_entry_write_units void handler_entry_write_units::write(offs_t offset, uX data, uX mem_mask) { + ref(); + for (int index = 0; index < m_subunits; index++) { const subunit_info &si = m_subunit_infos[index]; if (mem_mask & si.m_amask) { @@ -201,6 +207,8 @@ template void handler_entry_write_units