Commit 8af84d44 authored by louiz’'s avatar louiz’

Fix a segfault when receiving a move order for a dead entity

parent 3d005974
......@@ -140,6 +140,8 @@ void World::do_move(const std::vector<EntityId>& ids, const Position& pos, const
{
log_debug("Moving entity " << id << " to pos " << pos);
entity = this->get_entity_by_id(id);
if (!entity)
continue;
if (queue)
entity->queue_work(std::make_unique<PathWork>(entity, pos));
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment