Browse Source

Skip inheritance check for unresolved types

ghorsington 5 years ago
parent
commit
0d1049c56c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      BepInEx/Utility.cs

+ 1 - 1
BepInEx/Utility.cs

@@ -132,7 +132,7 @@ namespace BepInEx
 		{
 			if (self.FullName == td.FullName)
 				return true;
-			return self.FullName != "System.Object" && (self.BaseType?.Resolve().IsSubtypeOf(td) ?? false);
+			return self.FullName != "System.Object" && (self.BaseType?.Resolve()?.IsSubtypeOf(td) ?? false);
 		}
 
 		/// <summary>