From 33ffa420a6877f8ced078ae483964f5f422ab88e Mon Sep 17 00:00:00 2001 From: wiseoldman95 Date: Sun, 3 May 2015 19:30:28 +0300 Subject: PathFinder - Fixed nullptr chunk bug --- src/Mobs/Path.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mobs/Path.cpp b/src/Mobs/Path.cpp index 32eff9d2b..d1b9d6963 100644 --- a/src/Mobs/Path.cpp +++ b/src/Mobs/Path.cpp @@ -117,7 +117,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; } -- cgit v1.2.3