1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-04 07:03:39 +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
Unverified
parent 57640810b5
commit deabce7140
+4
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))