diff options
author | 2019-07-12 09:39:39 -0400 | |
---|---|---|
committer | 2019-07-12 09:39:39 -0400 | |
commit | 46b0fa88be0bce3d39ca0daa204f2500263802cc (patch) | |
tree | a1fe1ca740cc94a31424a4e3ada9b711e933d942 /src/devices/bus/sms_ctrl/multitap.cpp | |
parent | 12e99942ff3048f3e8f45f2a00039cb09108b385 (diff) |
bus/gamegear, bus/nes_ctrl, bus/sms_ctrl: Prevent crashing during validation (nw)
Diffstat (limited to 'src/devices/bus/sms_ctrl/multitap.cpp')
-rw-r--r-- | src/devices/bus/sms_ctrl/multitap.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/devices/bus/sms_ctrl/multitap.cpp b/src/devices/bus/sms_ctrl/multitap.cpp index 2e5c0e0701a..74d6c749cb5 100644 --- a/src/devices/bus/sms_ctrl/multitap.cpp +++ b/src/devices/bus/sms_ctrl/multitap.cpp @@ -131,8 +131,11 @@ void sms_multitap_device::device_add_mconfig(machine_config &config) SMS_CONTROL_PORT(config, m_subctrl2_port, sms_control_port_devices, "joypad"); SMS_CONTROL_PORT(config, m_subctrl3_port, sms_control_port_devices, "joypad"); SMS_CONTROL_PORT(config, m_subctrl4_port, sms_control_port_devices, "joypad"); - m_subctrl1_port->set_screen_tag(m_port->m_screen); - m_subctrl2_port->set_screen_tag(m_port->m_screen); - m_subctrl3_port->set_screen_tag(m_port->m_screen); - m_subctrl4_port->set_screen_tag(m_port->m_screen); + if (m_port != nullptr) + { + m_subctrl1_port->set_screen_tag(m_port->m_screen); + m_subctrl2_port->set_screen_tag(m_port->m_screen); + m_subctrl3_port->set_screen_tag(m_port->m_screen); + m_subctrl4_port->set_screen_tag(m_port->m_screen); + } } |