Fix segfault
This commit is contained in:
parent
fbdad4a7b0
commit
42e0f56c6c
@ -21,6 +21,8 @@ void game::Entity::Update()
|
||||
if (parentnum_)
|
||||
{
|
||||
parent_ = world_.GetEntity(parentnum_);
|
||||
|
||||
if (parent_)
|
||||
parent_->TryUpdate();
|
||||
}
|
||||
|
||||
|
||||
@ -47,6 +47,8 @@ void game::view::EntityView::Update(const UpdateInfo& info)
|
||||
if (parentnum_)
|
||||
{
|
||||
parent_ = world_.GetEntity(parentnum_);
|
||||
|
||||
if (parent_)
|
||||
parent_->TryUpdate(info);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user