浏览代码

Fix recursion in MetadataHelper.GetMetadata

ghorsington 5 年之前
父节点
当前提交
e4a61ebad6
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      BepInEx/Contract/Attributes.cs

+ 1 - 1
BepInEx/Contract/Attributes.cs

@@ -151,7 +151,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.