mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 04:42:58 +08:00
Disallow updating the database to an invalid value
This commit is contained in:
parent
57640810b5
commit
deabce7140
@ -104,6 +104,10 @@ namespace osu.Game.Input
|
||||
using (ContextFactory.GetForWrite())
|
||||
{
|
||||
var dbKeyBinding = (DatabasedKeyBinding)keyBinding;
|
||||
|
||||
if (dbKeyBinding.RulesetID != null && !CheckValidForGameplay(keyBinding.KeyCombination))
|
||||
return;
|
||||
|
||||
Refresh(ref dbKeyBinding);
|
||||
|
||||
if (dbKeyBinding.KeyCombination.Equals(keyBinding.KeyCombination))
|
||||
|
Loading…
Reference in New Issue
Block a user