Fix a m_JumpPointCache assertion failure in debug mode, refs fa726867f1.

Patch By: Stan
Comments By: wraitii
Differential Revision: https://code.wildfiregames.com/D1942
This was SVN commit r22336.
This commit is contained in:
Itms
2019-06-04 08:29:47 +00:00
parent 800bf0da24
commit 37e5097ea9
@@ -720,8 +720,9 @@ void LongPathfinder::ComputeJPSPath(const HierarchicalPathfinder& hierPath, enti
PathfinderState state = { 0 };
std::map<pass_class_t, shared_ptr<JumpPointCache> >::const_iterator it = m_JumpPointCache.find(passClass);
state.jpc = it->second.get();
if (it != m_JumpPointCache.end())
state.jpc = it->second.get();
if (m_UseJPSCache && !state.jpc)
{
state.jpc = new JumpPointCache;