diff options
author | smf- <smf-@users.noreply.github.com> | 2019-10-21 08:37:14 +0100 |
---|---|---|
committer | smf- <smf-@users.noreply.github.com> | 2019-10-21 08:37:39 +0100 |
commit | 02f39608f22896ec76a1e26720a1d0f3fd0862b7 (patch) | |
tree | d6c8d04ac427591d157fea77bd6508e2345560da | |
parent | 83296b75ec1f51ee189cc140530d6d6601d91ef5 (diff) |
ref count in flight calls, fixes MT07456 [O. Galibert, smf]
-rw-r--r-- | src/emu/emumem_heu.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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<int Width, int AddrShift, int Endian> void handler_entry_read_units<Wid template<int Width, int AddrShift, int Endian> typename emu::detail::handler_entry_size<Width>::uX handler_entry_read_units<Width, AddrShift, Endian>::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<int Width, int AddrShift, int Endian> typename emu::detail::handler_ent } } } + + unref(); return result; } @@ -173,6 +177,8 @@ template<int Width, int AddrShift, int Endian> void handler_entry_write_units<Wi template<int Width, int AddrShift, int Endian> void handler_entry_write_units<Width, AddrShift, Endian>::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<int Width, int AddrShift, int Endian> void handler_entry_write_units<Wi } } } + + unref(); } |