mirror of
https://github.com/ppy/osu
synced 2024-12-28 09:52:56 +00:00
Avoid potential crashes when lease is held on SelectedMods
This commit is contained in:
parent
3e750feaa4
commit
630c5bb747
@ -469,6 +469,10 @@ namespace osu.Game
|
||||
{
|
||||
updateModDefaults();
|
||||
|
||||
// a lease may be taken on the mods bindable, at which point we can't really ensure valid mods.
|
||||
if (SelectedMods.Disabled)
|
||||
return;
|
||||
|
||||
if (!ModUtils.CheckValidForGameplay(mods.NewValue, out var invalid))
|
||||
{
|
||||
// ensure we always have a valid set of mods.
|
||||
|
Loading…
Reference in New Issue
Block a user