mirror of
https://github.com/BepInEx/BepInEx.git
synced 2026-10-20 01:46:13 +00:00
Improve SRE check
This commit is contained in:
1 parent
5fadac5b43
commit
212b8aabf6
1 file changed
+6
-1
+6
-1
@@ -22,13 +22,18 @@ namespace BepInEx
|
||||
{
|
||||
try
|
||||
{
|
||||
var m = new DynamicMethod("SRE_Test", null, null);
|
||||
CLRSupportsDynamicAssemblies = true;
|
||||
// ReSharper disable once AssignNullToNotNullAttribute
|
||||
var m = new CustomAttributeBuilder(null, new object[0]);
|
||||
}
|
||||
catch (PlatformNotSupportedException)
|
||||
{
|
||||
CLRSupportsDynamicAssemblies = false;
|
||||
}
|
||||
catch (ArgumentNullException)
|
||||
{
|
||||
// Suppress ArgumentNullException
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in new issue
Block a user