1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 12:57:36 +08:00

Fix potential nullref in test scene

This commit is contained in:
Dean Herbert 2020-12-28 20:48:14 +09:00
parent 6254907ef9
commit 92d74a9343

View File

@ -95,7 +95,7 @@ namespace osu.Game.Tests.Visual.Gameplay
{
public bool CheckPositionByUsername(string username, int? expectedPosition)
{
var scoreItem = this.FirstOrDefault(i => i.User.Username == username);
var scoreItem = this.FirstOrDefault(i => i.User?.Username == username);
return scoreItem != null && scoreItem.ScorePosition == expectedPosition;
}