From 060f8aadfec0b23b26dd784f6e6ac87c2ba5a2ec Mon Sep 17 00:00:00 2001 From: Uleat Date: Tue, 31 Jul 2018 07:14:01 -0400 Subject: [PATCH] Fix for NavMesh crash --- libs/recast/detour/src/DetourNavMeshQuery.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/recast/detour/src/DetourNavMeshQuery.cpp b/libs/recast/detour/src/DetourNavMeshQuery.cpp index d27a142d0..aa06b006a 100644 --- a/libs/recast/detour/src/DetourNavMeshQuery.cpp +++ b/libs/recast/detour/src/DetourNavMeshQuery.cpp @@ -1096,7 +1096,7 @@ dtStatus dtNavMeshQuery::findPath(dtPolyRef startRef, dtPolyRef endRef, // The API input has been cheked already, skip checking internal data. const dtMeshTile* neighbourTile = 0; const dtPoly* neighbourPoly = 0; - if (m_nav->getTileAndPolyByRef(neighbourRef, &neighbourTile, &neighbourPoly) == DT_FAILURE) { + if (dtStatusFailed(m_nav->getTileAndPolyByRef(neighbourRef, &neighbourTile, &neighbourPoly))) { continue; }