Fixes null propogation and expression is always true/false

This commit is contained in:
Kamron Batman 2018-09-15 15:58:36 -07:00
parent a48ebb3a5f
commit 8da55d6043
6 changed files with 37 additions and 58 deletions

View file

@ -716,10 +716,9 @@ namespace Server
{
object[] attrs = type.GetCustomAttributes(typeofTypeAliasAttribute, false);
if (attrs != null && attrs.Length > 0)
if (attrs[0] is TypeAliasAttribute attr)
for (int j = 0; j < attr.Aliases.Length; ++j)
FullNames.Add(attr.Aliases[j], type);
if (attrs.Length > 0 && attrs[0] is TypeAliasAttribute attr)
for (int j = 0; j < attr.Aliases.Length; ++j)
FullNames.Add(attr.Aliases[j], type);
}
}
}