Prevent trying to access an entry when none exist. (#1898)

This commit is contained in:
Kurochi51 2024-07-05 21:29:15 +03:00 committed by GitHub
parent 4df929ec9f
commit 6992336c63
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -270,7 +270,7 @@ internal class TitleScreenMenuWindow : Window, IDisposable
case State.Hide:
{
if (this.DrawEntry(entries[0], true, false, true, true, false))
if (entries.Count > 0 && this.DrawEntry(entries[0], true, false, true, true, false))
{
this.state = State.Show;
}