From ed0971c2dc7f53ffb4950b02f6cb567ee839360d Mon Sep 17 00:00:00 2001 From: AJR Date: Tue, 10 Oct 2017 11:50:14 -0400 Subject: smpc: Don't downcast controllers that aren't configured (nw) --- src/devices/machine/smpc.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/devices/machine/smpc.cpp b/src/devices/machine/smpc.cpp index 6b2c9f8a733..1b4f36afb2d 100644 --- a/src/devices/machine/smpc.cpp +++ b/src/devices/machine/smpc.cpp @@ -315,9 +315,12 @@ void smpc_hle_device::device_start() m_rtc_data[4] = DectoBCD(systime.local_time.hour); m_rtc_data[5] = DectoBCD(systime.local_time.minute); m_rtc_data[6] = DectoBCD(systime.local_time.second); - - m_ctrl1 = downcast(machine().device(m_ctrl1_tag)); - m_ctrl2 = downcast(machine().device(m_ctrl2_tag)); + + if (m_has_ctrl_ports) + { + m_ctrl1 = downcast(machine().device(m_ctrl1_tag)); + m_ctrl2 = downcast(machine().device(m_ctrl2_tag)); + } // m_has_ctrl_ports = (m_ctrl1 != nullptr && m_ctrl2 != nullptr); } -- cgit v1.2.3