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