1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:20:04 +08:00

Add assert on storing to database

This commit is contained in:
Dean Herbert 2021-05-24 18:41:39 +09:00
parent deabce7140
commit a00f226ab3

View File

@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using osu.Framework.Input.Bindings;
using osu.Framework.Platform;
@ -105,8 +106,7 @@ namespace osu.Game.Input
{
var dbKeyBinding = (DatabasedKeyBinding)keyBinding;
if (dbKeyBinding.RulesetID != null && !CheckValidForGameplay(keyBinding.KeyCombination))
return;
Debug.Assert(dbKeyBinding.RulesetID == null || CheckValidForGameplay(keyBinding.KeyCombination));
Refresh(ref dbKeyBinding);