summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2015-05-03 19:53:37 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2015-05-03 19:53:37 +0200
commit335879e22410a6b335d92347c658219f02c0d9c3 (patch)
treeb8ac5667872f2fa5ba7ed591aca7756dd1269a79
parentMerge pull request #1930 from SafwatHalaby/AI_Jump (diff)
parentPathFinder - Fixed nullptr chunk bug (diff)
downloadcuberite-335879e22410a6b335d92347c658219f02c0d9c3.tar
cuberite-335879e22410a6b335d92347c658219f02c0d9c3.tar.gz
cuberite-335879e22410a6b335d92347c658219f02c0d9c3.tar.bz2
cuberite-335879e22410a6b335d92347c658219f02c0d9c3.tar.lz
cuberite-335879e22410a6b335d92347c658219f02c0d9c3.tar.xz
cuberite-335879e22410a6b335d92347c658219f02c0d9c3.tar.zst
cuberite-335879e22410a6b335d92347c658219f02c0d9c3.zip
Diffstat (limited to '')
-rw-r--r--src/Mobs/Path.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Mobs/Path.cpp b/src/Mobs/Path.cpp
index f414b4c9e..2dd2a3c99 100644
--- a/src/Mobs/Path.cpp
+++ b/src/Mobs/Path.cpp
@@ -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;
}