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:
parent
6254907ef9
commit
92d74a9343
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user