1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 07:22:54 +08:00

Guard against ruleset icon creation failures to avoid whole game death

This commit is contained in:
Dean Herbert 2022-06-29 18:51:07 +09:00
parent d4aa18112b
commit b092e6937a

View File

@ -5,6 +5,7 @@
using osu.Framework.Graphics.UserInterface;
using osu.Framework.Allocation;
using osu.Framework.Logging;
namespace osu.Game.Rulesets
{
@ -19,7 +20,16 @@ namespace osu.Game.Rulesets
private void load()
{
foreach (var r in Rulesets.AvailableRulesets)
AddItem(r);
{
try
{
AddItem(r);
}
catch
{
Logger.Log($"Could not create ruleset icon for {r.Name}. Please check for an update.", level: LogLevel.Error);
}
}
}
}
}