Fix segfault

This commit is contained in:
tovjemam 2026-02-20 21:29:46 +01:00
parent fbdad4a7b0
commit 42e0f56c6c
2 changed files with 6 additions and 2 deletions

View File

@ -21,6 +21,8 @@ void game::Entity::Update()
if (parentnum_)
{
parent_ = world_.GetEntity(parentnum_);
if (parent_)
parent_->TryUpdate();
}

View File

@ -47,6 +47,8 @@ void game::view::EntityView::Update(const UpdateInfo& info)
if (parentnum_)
{
parent_ = world_.GetEntity(parentnum_);
if (parent_)
parent_->TryUpdate(info);
}