mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 10:03:05 +08:00
Guard against ruleset icon creation failures to avoid whole game death
This commit is contained in:
parent
d4aa18112b
commit
b092e6937a
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Logging;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets
|
namespace osu.Game.Rulesets
|
||||||
{
|
{
|
||||||
@ -19,7 +20,16 @@ namespace osu.Game.Rulesets
|
|||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
foreach (var r in Rulesets.AvailableRulesets)
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user