From 11a57f5285a7da6ded3b9923099e286d6db665ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20L=C3=BCbe=C3=9F?= Date: Mon, 31 Jul 2023 16:35:38 +0200 Subject: [PATCH] Fixed ComponentEditWindow showing component editor after it was deleted --- GlitchyEditor/src/EditWindows/ComponentEditWindow.bf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/GlitchyEditor/src/EditWindows/ComponentEditWindow.bf b/GlitchyEditor/src/EditWindows/ComponentEditWindow.bf index 43ab701..aaa269b 100644 --- a/GlitchyEditor/src/EditWindows/ComponentEditWindow.bf +++ b/GlitchyEditor/src/EditWindows/ComponentEditWindow.bf @@ -112,7 +112,8 @@ namespace GlitchyEditor.EditWindows if (nodeOpen) { - showComponentEditor(entity, component); + if (entity.TryGetComponent(let actualComponent)) + showComponentEditor(entity, actualComponent); ImGui.TreePop(); }