1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 02:43:19 +08:00

Ignore possible null in GetResponseString()

A null there indicates a deserialisation error and therefore due to the
catch block immediately succeeding the changed line everything will
continue to work as intended.
This commit is contained in:
Bartłomiej Dach 2021-05-14 23:47:35 +02:00
parent 628e7a71ed
commit 5b2b701915

View File

@ -270,7 +270,7 @@ namespace osu.Game.Online.API
{
try
{
return JObject.Parse(req.GetResponseString()).SelectToken("form_error", true).AsNonNull().ToObject<RegistrationRequest.RegistrationRequestErrors>();
return JObject.Parse(req.GetResponseString().AsNonNull()).SelectToken("form_error", true).AsNonNull().ToObject<RegistrationRequest.RegistrationRequestErrors>();
}
catch
{