diff --git a/Assets/Fungus/Scripts/Editor/FlowchartWindow.cs b/Assets/Fungus/Scripts/Editor/FlowchartWindow.cs index 896e885b..089423a9 100644 --- a/Assets/Fungus/Scripts/Editor/FlowchartWindow.cs +++ b/Assets/Fungus/Scripts/Editor/FlowchartWindow.cs @@ -472,6 +472,7 @@ namespace Fungus.EditorUtils FlowchartEditor flowchartEditor = Editor.CreateEditor (flowchart) as FlowchartEditor; flowchartEditor.DrawVariablesGUI(); + DestroyImmediate(flowchartEditor); Rect variableWindowRect = GUILayoutUtility.GetLastRect(); if (flowchart.VariablesExpanded && flowchart.Variables.Count > 0)