Add fallback case for GetDisplayString if called on a null reference

This commit is contained in:
Dean Herbert
2021-11-12 15:25:59 +09:00
parent a754b40a8a
commit 98dcf487da
2 changed files with 16 additions and 7 deletions

View File

@ -54,7 +54,7 @@ namespace osu.Game.Extensions
}
// fallback in case none of the above happens to match.
result ??= model.ToString();
result ??= model?.ToString() ?? @"null";
return result;
}
}