Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

Commit 04ce18b

Browse files
committed
Update FileHelper.cs
1 parent b548b92 commit 04ce18b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

dnSpy.Extension.Cpp2IL/FileHelper.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ static FileHelper()
3030
ProcessingLayerRegistry.Register<StableRenamingProcessingLayer>();
3131
ProcessingLayerRegistry.Register<DeobfuscationMapProcessingLayer>();
3232
#if NET6_0_OR_GREATER
33-
NativeLibrary.Load(typeof(FileHelper).Assembly.Location.Replace("dnSpy.Extension.Cpp2IL.x.dll", "capstone.dll"));
33+
var path = typeof(FileHelper).Assembly.Location.Replace("dnSpy.Extension.Cpp2IL.x.dll", "capstone.dll");
34+
if (File.Exists(path))
35+
NativeLibrary.TryLoad(path, out _);
3436
#endif
3537
}
3638

0 commit comments

Comments
 (0)