summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2019-02-13 09:45:06 +0100
committer hap <happppp@users.noreply.github.com>2019-02-13 09:45:06 +0100
commit26d9320c2a3d1d8c81b5ae34a7e1eea90245c279 (patch)
tree17f3c5689b8bfba2d35e650d07d08b3e699ef36b
parentf6262a1e8695ec0cbb9eb4bcdd91e6fbffb2b5d4 (diff)
better (nw)
-rw-r--r--src/devices/machine/timer.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/devices/machine/timer.h b/src/devices/machine/timer.h
index 66a2a8fbdae..944db93c1e5 100644
--- a/src/devices/machine/timer.h
+++ b/src/devices/machine/timer.h
@@ -122,7 +122,7 @@ public:
attotime time_left() const { return m_timer->remaining(); }
attotime start_time() const { return m_timer->start(); }
attotime fire_time() const { return m_timer->expire(); }
- attotime period() const { return m_period; } // only for TIMER_TYPE_PERIODIC
+ attotime period() const { return m_timer ? m_timer->period() : m_period; }
private:
// device-level overrides