diff --git a/sources/BaseAPI/API/Unflect/UnflectApi.uc b/sources/BaseAPI/API/Unflect/UnflectApi.uc index 9b4873d..5213bd8 100644 --- a/sources/BaseAPI/API/Unflect/UnflectApi.uc +++ b/sources/BaseAPI/API/Unflect/UnflectApi.uc @@ -67,6 +67,7 @@ public final function _drop() { // Drop is called when Acedia is shutting down, so releasing references isn't necessary iter = HashTableIterator(completedReplacements.Iterate()); while (!iter.HasFinished()) { + nextFunctionInstance = none; nextFunctionName = Text(iter.GetKey()); nextSources = ByteArrayBox(originalScriptCodes.GetItem(nextFunctionName)); if (nextSources != none ) { @@ -75,6 +76,7 @@ public final function _drop() { if (nextFunctionInstance != none) { nextFunctionInstance.script = nextSources.Get(); } + iter.Next(); } }