diff --git a/src/modules/graphics/Polyline.cpp b/src/modules/graphics/Polyline.cpp index e768687c4..90251e68a 100644 --- a/src/modules/graphics/Polyline.cpp +++ b/src/modules/graphics/Polyline.cpp @@ -100,7 +100,7 @@ void Polyline::render(const Vector2 *coords, size_t count, size_t size_hint, flo } // Add the degenerate triangle strip. - if (extra_vertices) + if (extra_vertices && vertex_count > 0) { vertices[vertex_count + 0] = vertices[vertex_count - 1]; vertices[vertex_count + 1] = vertices[overdraw_vertex_start];