summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Michael Zapf <Michael.Zapf@mizapf.de>2015-04-21 15:15:30 +0200
committer Michael Zapf <Michael.Zapf@mizapf.de>2015-04-21 15:15:30 +0200
commit30523ddcd0a4f40cea928c68b4834cc3fb990f67 (patch)
treed0459bfbefa139f49fc31ace15b597a1d1116beb /src
parenta0054fed49b6598f9875ffc6632a14600e5a0ac6 (diff)
(MESS) ti99: Forgotten null check. (nw)
Diffstat (limited to 'src')
-rw-r--r--src/emu/bus/ti99_peb/hfdc.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/emu/bus/ti99_peb/hfdc.c b/src/emu/bus/ti99_peb/hfdc.c
index 6d778d3c5e1..42bec79a255 100644
--- a/src/emu/bus/ti99_peb/hfdc.c
+++ b/src/emu/bus/ti99_peb/hfdc.c
@@ -578,16 +578,20 @@ void myarc_hfdc_device::signal_drive_status()
{
if ((m_output1_latch & 0xe0)!=0)
{
- if (m_current_harddisk->ready_r()==ASSERT_LINE)
+ if (m_current_harddisk != NULL)
{
- m_status_latch |= HDC_DS_READY;
- set_bits(m_status_latch, HDC_DS_SKCOM, m_current_harddisk->seek_complete_r()==ASSERT_LINE);
- set_bits(m_status_latch, HDC_DS_TRK00, m_current_harddisk->trk00_r()==ASSERT_LINE);
+ if (m_current_harddisk->ready_r()==ASSERT_LINE)
+ {
+ m_status_latch |= HDC_DS_READY;
+ set_bits(m_status_latch, HDC_DS_SKCOM, m_current_harddisk->seek_complete_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;
m_hdc9234->auxbus_in(reply);