summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2021-02-09 11:04:39 -0500
committer AJR <ajrhacker@users.noreply.github.com>2021-02-09 11:07:48 -0500
commit8d25f46228ba04e0be0d2636b16e3e4462fd143f (patch)
tree8bb1f4815864440390196464d91344f3884ffcce
parent173a80fe8e1bcf6fd9a195d07dc73f3fc3bbfb96 (diff)
mc14411: Fix potential crashes caused by calling rate select handlers before device timers are instantiated
-rw-r--r--src/devices/machine/mc14411.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/devices/machine/mc14411.cpp b/src/devices/machine/mc14411.cpp
index 64bf476e2c4..fb24372e7bd 100644
--- a/src/devices/machine/mc14411.cpp
+++ b/src/devices/machine/mc14411.cpp
@@ -251,7 +251,8 @@ void mc14411_device::rate_select_w(uint8_t data)
if (m_divider != (data & 3))
{
m_divider = data & 3;
- notify_clock_changed();
+ if (started())
+ notify_clock_changed();
}
}
@@ -267,7 +268,8 @@ void mc14411_device::rsa_w(int state)
if ((m_divider & RSA) != (state == ASSERT_LINE ? RSA : 0))
{
m_divider = (m_divider & ~RSA) | (state == ASSERT_LINE ? RSA : 0);
- notify_clock_changed();
+ if (started())
+ notify_clock_changed();
}
}
@@ -283,7 +285,8 @@ void mc14411_device::rsb_w(int state)
if ((m_divider & RSB) != (state == ASSERT_LINE ? RSB : 0))
{
m_divider = (m_divider & ~RSB) | (state == ASSERT_LINE ? RSB : 0);
- notify_clock_changed();
+ if (started())
+ notify_clock_changed();
}
}