mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-14 15:41:30 +00:00
Patch detour to avoid a crash if an invalid ref is returned
This commit is contained in:
parent
b475f66014
commit
c985307057
@ -1096,7 +1096,9 @@ dtStatus dtNavMeshQuery::findPath(dtPolyRef startRef, dtPolyRef endRef,
|
|||||||
// The API input has been cheked already, skip checking internal data.
|
// The API input has been cheked already, skip checking internal data.
|
||||||
const dtMeshTile* neighbourTile = 0;
|
const dtMeshTile* neighbourTile = 0;
|
||||||
const dtPoly* neighbourPoly = 0;
|
const dtPoly* neighbourPoly = 0;
|
||||||
m_nav->getTileAndPolyByRefUnsafe(neighbourRef, &neighbourTile, &neighbourPoly);
|
if (m_nav->getTileAndPolyByRef(neighbourRef, &neighbourTile, &neighbourPoly) == DT_FAILURE) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (!filter->passFilter(neighbourRef, neighbourTile, neighbourPoly))
|
if (!filter->passFilter(neighbourRef, neighbourTile, neighbourPoly))
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user