mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 13:23:22 +08:00
Don't throw when a ruleset type is completely missing
This commit is contained in:
parent
bb46f72f9e
commit
9d31f61ca9
@ -68,8 +68,14 @@ namespace osu.Game.Rulesets
|
||||
{
|
||||
try
|
||||
{
|
||||
var resolvedType = Type.GetType(r.InstantiationInfo)
|
||||
?? throw new RulesetLoadException(@"Type could not be resolved");
|
||||
var resolvedType = Type.GetType(r.InstantiationInfo);
|
||||
|
||||
if (resolvedType == null)
|
||||
{
|
||||
// ruleset DLL was probably deleted.
|
||||
r.Available = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
var instanceInfo = (Activator.CreateInstance(resolvedType) as Ruleset)?.RulesetInfo
|
||||
?? throw new RulesetLoadException(@"Instantiation failure");
|
||||
|
Loading…
Reference in New Issue
Block a user