Skip to content

Commit

Permalink
server: fix crash when m_pCurrentPathTarget is null
Browse files Browse the repository at this point in the history
  • Loading branch information
nillerusr committed Mar 26, 2021
1 parent 850fca7 commit 391a86b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions game/server/ai_trackpather.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1026,6 +1026,9 @@ void CAI_TrackPather::UpdateCurrentTargetLeading()
bool bRestingAtDest = false;
CPathTrack *pAdjustedDest;

if( !m_pCurrentPathTarget )
return;

// Find the point along the line that we're closest to.
const Vector &vecTarget = m_pCurrentPathTarget->GetAbsOrigin();
Vector vecPoint;
Expand Down

0 comments on commit 391a86b

Please sign in to comment.