From 651b0614c4f123c463112f3b20873d57467cc240 Mon Sep 17 00:00:00 2001 From: Syntriax Date: Fri, 10 Oct 2025 11:43:04 +0300 Subject: [PATCH] fix: index check on triangle batch flush --- .../Engine.Integration.MonoGame/TriangleBatch.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Engine.Integration/Engine.Integration.MonoGame/TriangleBatch.cs b/Engine.Integration/Engine.Integration.MonoGame/TriangleBatch.cs index 1612526..e4201f2 100644 --- a/Engine.Integration/Engine.Integration.MonoGame/TriangleBatch.cs +++ b/Engine.Integration/Engine.Integration.MonoGame/TriangleBatch.cs @@ -58,6 +58,9 @@ public class TriangleBatch : ITriangleBatch private void Flush() { + if (verticesIndex == 0) + return; + graphicsDevice.RasterizerState = rasterizerState; basicEffect.Projection = _projection; basicEffect.View = _view;