diff --git a/MLEM.Ui/UiSystem.cs b/MLEM.Ui/UiSystem.cs index d64accd..9ffe3fc 100644 --- a/MLEM.Ui/UiSystem.cs +++ b/MLEM.Ui/UiSystem.cs @@ -128,11 +128,11 @@ namespace MLEM.Ui { if (root == null) return; this.rootElements.Remove(root); + root.SelectElement(null); root.Element.AndChildren(e => { e.Root = null; e.System = null; }); - root.SelectElement(null); } public RootElement Get(string name) {