1
0
This commit is contained in:
madmaxoft
2014-07-17 22:23:08 +02:00
3 changed files with 12 additions and 25 deletions

View File

@@ -1737,7 +1737,9 @@ void cChunkMap::RemoveEntity(cEntity * a_Entity)
{
cCSLock Lock(m_CSLayers);
cChunkPtr Chunk = GetChunkNoGen(a_Entity->GetChunkX(), ZERO_CHUNK_Y, a_Entity->GetChunkZ());
if ((Chunk == NULL) || !Chunk->IsValid())
// Even if a chunk is not valid, it may still contain entities such as players; make sure to remove them (#1190)
if (Chunk == NULL)
{
return;
}