From b832a202ab052b0544ca26225c4fe771cf31ede7 Mon Sep 17 00:00:00 2001 From: worktycho Date: Thu, 26 Jun 2014 18:30:02 +0100 Subject: Add Null check to SendBlockTo Fixes CID 43611 --- src/ChunkMap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ChunkMap.cpp') diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp index d2ccca94e..f0222c0f5 100644 --- a/src/ChunkMap.cpp +++ b/src/ChunkMap.cpp @@ -1530,7 +1530,7 @@ void cChunkMap::SendBlockTo(int a_X, int a_Y, int a_Z, cPlayer * a_Player) cCSLock Lock(m_CSLayers); cChunkPtr Chunk = GetChunk(ChunkX, ZERO_CHUNK_Y, ChunkZ); - if (Chunk->IsValid()) + if (Chunk != NULL && Chunk->IsValid()) { Chunk->SendBlockTo(a_X, a_Y, a_Z, a_Player->GetClientHandle()); } -- cgit v1.2.3