From f09ca17e4db04ad978cb7015c72b4eaa08c07275 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diogo=20Mendon=C3=A7a?= Date: Thu, 14 Sep 2023 08:56:26 +0100 Subject: [PATCH] fix(engine): fix entity inspector crashing on entity deletion --- engine/src/cubos/engine/tools/entity_inspector/plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/src/cubos/engine/tools/entity_inspector/plugin.cpp b/engine/src/cubos/engine/tools/entity_inspector/plugin.cpp index 0e826d7f0..5e94c77f9 100644 --- a/engine/src/cubos/engine/tools/entity_inspector/plugin.cpp +++ b/engine/src/cubos/engine/tools/entity_inspector/plugin.cpp @@ -23,7 +23,7 @@ static void inspectEntity(Write world) { ImGui::BeginTable("showEntity", 2, ImGuiTableFlags_BordersOuter | ImGuiTableFlags_Resizable); - if (!selection.isNull()) + if (!selection.isNull() && world->isAlive(selection)) { auto pkg = world->pack(selection); if (editPackage(pkg, std::to_string(selection.index)))