Use `LastOrDefault` instead

This commit is contained in:
Salman Ahmed 2021-06-28 12:43:55 +03:00
parent 7197998a10
commit 66fc95c111
1 changed files with 1 additions and 1 deletions

View File

@ -88,7 +88,7 @@ protected virtual void UpdateSkinSources()
} }
} }
int lastDefaultSkinIndex = SkinSources.IndexOf(SkinSources.OfType<DefaultSkin>().Last()); int lastDefaultSkinIndex = SkinSources.IndexOf(SkinSources.OfType<DefaultSkin>().LastOrDefault());
// Ruleset resources should be given the ability to override game-wide defaults // Ruleset resources should be given the ability to override game-wide defaults
// This is achieved by placing them before the last instance of DefaultSkin. // This is achieved by placing them before the last instance of DefaultSkin.