1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 20:22:55 +08:00

Allow null values for ReadCurrentFromDifficulty

As long as this isn't a constructor parameter it feels best to
gracefully handle omission. Realistically having it in the ctor is the
best move, but it doesn't feel great in line with the other parameters
passed in via object initalisers.
This commit is contained in:
Dean Herbert 2021-07-09 13:26:00 +09:00
parent 90326f8864
commit f9cd7f10d8

View File

@ -72,7 +72,7 @@ namespace osu.Game.Rulesets.Mods
if (difficulty == null)
return;
if (Current.Value == null)
if (Current.Value == null && difficultyBindable.ReadCurrentFromDifficulty != null)
{
// ensure the beatmap's value is not transferred as a user override.
isInternalChange = true;