diff options
| author | 2016-01-20 21:33:19 +0100 | |
|---|---|---|
| committer | 2016-01-20 21:33:19 +0100 | |
| commit | a62e7d85653c5871b3dfa2af14eeba64468ed251 (patch) | |
| tree | eeab59a0a62194c552c4c3aeda5d708e90da86c2 /src/emu/devcb.cpp | |
| parent | 4a57509cafd4c67f61a82d801640478b07059b55 (diff) | |
Revert "Fix callbacks resolve (nw)"
This reverts commit a0ca8148ebd8751947d6c8521a09b21150915d31.
Diffstat (limited to 'src/emu/devcb.cpp')
| -rw-r--r-- | src/emu/devcb.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/emu/devcb.cpp b/src/emu/devcb.cpp index 93d17505a7d..6bb92fb35e1 100644 --- a/src/emu/devcb.cpp +++ b/src/emu/devcb.cpp @@ -56,7 +56,7 @@ void devcb_base::reset(callback_type type) void devcb_base::resolve_ioport() { // attempt to resolve, fatal error if fail - m_target.ioport = m_device.owner()->ioport(m_target_tag); + m_target.ioport = (!m_target_tag.empty()) ? m_device.owner()->ioport(m_target_tag) : nullptr; if (m_target.ioport == nullptr) throw emu_fatalerror("Unable to resolve I/O port callback reference to '%s' in device '%s'\n", m_target_tag.c_str(), m_device.tag().c_str()); } @@ -70,7 +70,7 @@ void devcb_base::resolve_ioport() void devcb_base::resolve_inputline() { // attempt to resolve, fatal error if fail - m_target.device = m_device.owner()->subdevice(m_target_tag); + m_target.device = (!m_target_tag.empty()) ? m_device.owner()->subdevice(m_target_tag) : nullptr; if (m_target.device == nullptr) throw emu_fatalerror("Unable to resolve device reference to '%s' in device '%s'\n", m_target_tag.c_str(), m_device.tag().c_str()); @@ -89,7 +89,7 @@ void devcb_base::resolve_inputline() void devcb_base::resolve_space() { // attempt to resolve, fatal error if fail - device_t *spacedev = m_device.owner()->subdevice(m_space_tag); + device_t *spacedev = (!m_space_tag.empty()) ? m_device.owner()->subdevice(m_space_tag) : nullptr; if (spacedev == nullptr) throw emu_fatalerror("Unable to resolve device reference to '%s' in device '%s'\n", m_space_tag.c_str(), m_device.tag().c_str()); if (!spacedev->memory().has_space(m_space_num)) |
