1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 05:32:54 +08:00

Merge pull request #5412 from peppy/fix-triangles-crash

Fix TriangleDrawNode crash when required triangles is zero
This commit is contained in:
Dan Balasescu 2019-07-22 20:03:56 +09:00 committed by GitHub
commit 7083a1d01c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -214,7 +214,7 @@ namespace osu.Game.Graphics.Backgrounds
{
base.Draw(vertexAction);
if (vertexBatch == null || vertexBatch.Size != Source.AimCount)
if (Source.AimCount > 0 && (vertexBatch == null || vertexBatch.Size != Source.AimCount))
{
vertexBatch?.Dispose();
vertexBatch = new TriangleBatch<TexturedVertex2D>(Source.AimCount, 1);