diff --git a/osu.Game/Graphics/Backgrounds/Triangles.cs b/osu.Game/Graphics/Backgrounds/Triangles.cs index 20e92cd2c6..4f50abc985 100644 --- a/osu.Game/Graphics/Backgrounds/Triangles.cs +++ b/osu.Game/Graphics/Backgrounds/Triangles.cs @@ -192,12 +192,11 @@ namespace osu.Game.Graphics.Backgrounds private readonly List parts = new List(); private Vector2 size; - private readonly LinearBatch vertexBatch; + private LinearBatch vertexBatch; public TrianglesDrawNode(Triangles source) : base(source) { - vertexBatch = new LinearBatch(source.AimCount * 3, 2, PrimitiveType.Triangles); } public override void ApplyState() @@ -214,6 +213,9 @@ namespace osu.Game.Graphics.Backgrounds public override void Draw(Action vertexAction) { + if (vertexBatch == null && Source.AimCount > 0) + vertexBatch = new LinearBatch(Source.AimCount * 3, 2, PrimitiveType.Triangles); + base.Draw(vertexAction); shader.Bind();