From 2aed6158b87afb4f012a1ce0fa45ca3424bf5103 Mon Sep 17 00:00:00 2001 From: AJR Date: Sun, 11 Jul 2021 13:42:49 -0400 Subject: [PATCH] poly.h: Fix DEBUG=1 builds --- src/devices/video/poly.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/devices/video/poly.h b/src/devices/video/poly.h index 378e433b269..9cd91a69323 100644 --- a/src/devices/video/poly.h +++ b/src/devices/video/poly.h @@ -153,8 +153,6 @@ public: // allocate a return a new item ArrayType &next(int index = 0) { - assert(index < TrackingCount); - // track the maximum if (m_next > m_max) m_max = m_next; @@ -175,7 +173,10 @@ public: // set the last item m_next++; if (TrackingCount > 0) + { + assert(index < TrackingCount); m_last[index] = item; + } return *item; }