1
0

Merge pull request #1934 from SafwatHalaby/p_IsSolidChunks

PathFinder - Fixed nullptr chunk bug
This commit is contained in:
Tiger Wang 2015-05-03 18:53:37 +01:00
commit 335879e224

View File

@ -115,7 +115,7 @@ bool cPath::IsSolid(const Vector3d & a_Location)
{
ASSERT(m_Chunk != nullptr);
m_Chunk = m_Chunk->GetNeighborChunk(a_Location.x, a_Location.z);
if (!m_Chunk->IsValid())
if ((m_Chunk == nullptr) || (!m_Chunk->IsValid()))
{
return true;
}