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:
parent
1eb31afd14
commit
e5bf3f6a6a
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user