Pārlūkot izejas kodu

Fix recursion in MetadataHelper.GetMetadata

ghorsington 5 gadi atpakaļ
vecāks
revīzija
ec22e7fc59
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      BepInEx/Contract/Attributes.cs

+ 1 - 1
BepInEx/Contract/Attributes.cs

@@ -159,7 +159,7 @@ namespace BepInEx
 		/// </summary>
 		/// <param name="plugin">The plugin instance.</param>
 		/// <returns>The BepInPlugin metadata of the plugin instance.</returns>
-		public static BepInPlugin GetMetadata(object plugin) => GetMetadata(plugin.GetType());
+		public static BepInPlugin GetMetadata(object plugin) => GetMetadata(plugin as BaseUnityPlugin);
 
 		/// <summary>
 		/// Gets the specified attributes of a type, if they exist.