1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 05:42:56 +08:00

Fix out of bounds

This commit is contained in:
Kelvin 2017-08-29 00:46:11 -07:00
parent 1eb31afd14
commit e5bf3f6a6a

View File

@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using OpenTK.Graphics;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
@ -201,7 +202,7 @@ namespace osu.Game.Overlays.Music
max = m - 1;
}
return (int)items[min - 1].Depth;
return (int)items[Math.Max(0, min - 1)].Depth;
}
}
}