From 70f926eb49971ffc8cb4322521b8b49091bb7b48 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Mon, 9 Sep 2019 18:53:10 +0200 Subject: [PATCH] actually do this beforehand so that nothing crashes from having no system all of a sudden --- MLEM.Ui/UiSystem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {