(MESS) ti99: Forgotten null check. (nw)

This commit is contained in:
Michael Zapf 2015-04-21 15:15:30 +02:00
parent a0054fed49
commit 30523ddcd0

View File

@ -577,6 +577,8 @@ void myarc_hfdc_device::signal_drive_status()
else else
{ {
if ((m_output1_latch & 0xe0)!=0) if ((m_output1_latch & 0xe0)!=0)
{
if (m_current_harddisk != NULL)
{ {
if (m_current_harddisk->ready_r()==ASSERT_LINE) if (m_current_harddisk->ready_r()==ASSERT_LINE)
{ {
@ -585,9 +587,11 @@ void myarc_hfdc_device::signal_drive_status()
set_bits(m_status_latch, HDC_DS_TRK00, m_current_harddisk->trk00_r()==ASSERT_LINE); set_bits(m_status_latch, HDC_DS_TRK00, m_current_harddisk->trk00_r()==ASSERT_LINE);
} }
} }
// If WDS is selected but not connected, WDS.ready* and WDS.seekComplete* are 1, so Ready=SeekComplete=0
else set_bits(m_status_latch, HDC_DS_READY | HDC_DS_SKCOM, false);
}
} }
// If WDS is selected but not connected, WDS.ready* and WDS.seekComplete* are 1, so Ready=SeekComplete=0
reply |= m_status_latch; reply |= m_status_latch;
m_hdc9234->auxbus_in(reply); m_hdc9234->auxbus_in(reply);