1
0
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:
Dean Herbert 2021-05-24 18:40:56 +09:00
parent 57640810b5
commit deabce7140

View File

@ -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))