Skip to content

Commit

Permalink
fix(engine): fix entity inspector crashing on entity deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
DiogoMendonc-a committed Sep 17, 2023
1 parent 502e14c commit f09ca17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engine/src/cubos/engine/tools/entity_inspector/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ static void inspectEntity(Write<World> 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)))
Expand Down

0 comments on commit f09ca17

Please sign in to comment.