mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
Guard against ruleset icon creation failures to avoid whole game death
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user