mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 19:42:55 +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
|
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");
|
||||||
|
Loading…
Reference in New Issue
Block a user