server: fix crash when m_pCurrentPathTarget is null

This commit is contained in:
nillerusr 2021-03-26 11:25:55 +03:00
parent 850fca74ee
commit 391a86b225

View file

@ -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;