Skip to content

Commit

Permalink
fix: server crash
Browse files Browse the repository at this point in the history
  • Loading branch information
RobbeBryssinck committed May 29, 2022
1 parent b1912d8 commit b93cb7f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Code/server/Game/OwnerView.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ template <class... T>
decltype(auto) OwnerView<T...>::find(entt::entity aEntity) const
{
auto it = m_view.find(aEntity);

if (it == m_view.end())
return m_view.end();

if (m_view.template get<OwnerComponent>(*it).GetOwner() == m_pPlayer)
return iterator(m_pPlayer, it, std::end(m_view), m_view);

Expand Down

0 comments on commit b93cb7f

Please sign in to comment.