No longer crash when selected entity disappears

This commit is contained in:
Simon Lübeß
2024-03-17 20:10:48 +01:00
parent 2dd826fc36
commit 84204aed46
3 changed files with 39 additions and 14 deletions
@@ -326,7 +326,7 @@ namespace GlitchyEditor.EditWindows
if(_editor.EntityHierarchyWindow.SelectionSize == 0)
return false;
Entity entity = _editor.EntityHierarchyWindow.GetSelectedEntity(-1);
Entity entity = TrySilent!(_editor.EntityHierarchyWindow.GetSelectedEntity(-1));
var transformCmp = entity.GetComponent<TransformComponent>();