@@ -23,9 +23,9 @@ public class DirectCallMethod
2323 private readonly MethodReference _isNullOrEmpty ;
2424 private readonly MethodReference _stringEquals ;
2525 private readonly string _hookAttribute ;
26- private readonly Dictionary < Instruction , Node > _jumpToEdgePlaceholderTargets = new ( ) ;
27- private readonly List < Instruction > _jumpToEndPlaceholders = new ( ) ;
28- private readonly Dictionary < string , MethodDefinition > _hookMethods = new ( ) ;
26+ private readonly Dictionary < Instruction , Node > _jumpToEdgePlaceholderTargets ;
27+ private readonly List < Instruction > _jumpToEndPlaceholders ;
28+ private readonly Dictionary < string , MethodDefinition > _hookMethods ;
2929
3030 public DirectCallMethod ( ModuleDefinition module , TypeDefinition type , AssemblyDefinition baseAssembly )
3131 {
@@ -46,6 +46,10 @@ public DirectCallMethod(ModuleDefinition module, TypeDefinition type, AssemblyDe
4646
4747 _hookAttribute = typeof ( HookMethodAttribute ) . FullName ;
4848
49+ _jumpToEdgePlaceholderTargets = new Dictionary < Instruction , Node > ( ) ;
50+ _jumpToEndPlaceholders = new List < Instruction > ( ) ;
51+ _hookMethods = new Dictionary < string , MethodDefinition > ( ) ;
52+
4953 // Copy method definition from base class
5054 ModuleDefinition baseModule = baseAssembly . MainModule ;
5155 TypeDefinition baseType = module . ImportReference ( baseAssembly . MainModule . GetType ( "Oxide.Plugins.CSharpPlugin" ) ) . Resolve ( ) ;
0 commit comments