We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cbeac50 commit 8f59fd5Copy full SHA for 8f59fd5
managed/CounterStrikeSharp.API/Core/ScriptContext.cs
@@ -83,6 +83,8 @@ public unsafe ScriptContext(fxScriptContext* context)
83
84
internal fxScriptContext m_extContext = new fxScriptContext();
85
86
+ internal bool isCleanupLocked = false;
87
+
88
[SecuritySafeCritical]
89
public void Reset()
90
{
@@ -101,8 +103,16 @@ private void InternalReset()
101
103
102
104
public void Invoke()
105
- InvokeNativeInternal();
- GlobalCleanUp();
106
+ if (!isCleanupLocked)
107
+ {
108
+ isCleanupLocked = true;
109
+ InvokeNativeInternal();
110
+ GlobalCleanUp();
111
+ isCleanupLocked = false;
112
+ return;
113
+ }
114
115
116
}
117
118
[SecurityCritical]
0 commit comments