Move the null check in the outside.

AddCursor() should not accept the null value.
This commit is contained in:
andy840119
2022-06-30 23:29:49 +08:00
parent a5b1f1a688
commit 48047f2e58
3 changed files with 8 additions and 7 deletions

View File

@ -16,7 +16,7 @@ namespace osu.Game.Extensions
/// </summary>
public static void AddCursor(this WebRequest webRequest, Cursor cursor)
{
cursor?.Properties.ForEach(x =>
cursor.Properties.ForEach(x =>
{
webRequest.AddParameter("cursor[" + x.Key + "]", (x.Value as JValue)?.ToString(CultureInfo.InvariantCulture) ?? x.Value.ToString());
});