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