From 92b825104e4e5a183e5492e307525a9f1ba24168 Mon Sep 17 00:00:00 2001 From: goat <16760685+goaaats@users.noreply.github.com> Date: Sat, 1 May 2021 18:32:25 +0200 Subject: [PATCH] fix: null temp plugins after use --- Dalamud/Interface/Scratchpad/ScratchExecutionManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dalamud/Interface/Scratchpad/ScratchExecutionManager.cs b/Dalamud/Interface/Scratchpad/ScratchExecutionManager.cs index 3ef4524ea..3110fed5a 100644 --- a/Dalamud/Interface/Scratchpad/ScratchExecutionManager.cs +++ b/Dalamud/Interface/Scratchpad/ScratchExecutionManager.cs @@ -43,7 +43,7 @@ namespace Dalamud.Interface.Scratchpad if (existingScratch.Value != null) { existingScratch.Value.Dispose(); - this.loadedScratches.Remove(existingScratch.Key); + this.loadedScratches[existingScratch.Key] = null; } var code = doc.IsMacro ? this.MacroProcessor.Process(doc.Content) : doc.Content; @@ -76,7 +76,7 @@ namespace Dalamud.Interface.Scratchpad plugin.Initialize(pi); - this.loadedScratches.Add(doc.Id, plugin); + this.loadedScratches[doc.Id] = plugin; return ScratchLoadStatus.Success; } catch (CompilationErrorException ex)