summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/video/poly.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/video/poly.h')
-rw-r--r--src/devices/video/poly.h5
1 files 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;
}