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
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,7 @@ private void updateFromDifficulty()
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;