apple2gs: dont segfault if floppy not present, eg -fdc:3 "" (#7871)

This commit is contained in:
ksherlock 2021-03-18 18:42:06 -04:00 committed by GitHub
parent 78e551dbc7
commit 9357a69a36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1824,8 +1824,8 @@ TIMER_DEVICE_CALLBACK_MEMBER(apple2gs_state::apple2_interrupt)
m_motoroff_time--;
if (m_motoroff_time == 0)
{
m_floppy[2]->get_device()->tfsel_w(0);
m_floppy[3]->get_device()->tfsel_w(0);
if (m_floppy[2]->get_device()) m_floppy[2]->get_device()->tfsel_w(0);
if (m_floppy[3]->get_device()) m_floppy[3]->get_device()->tfsel_w(0);
}
}