Fixed crashes closing entities with unloaded levels

This commit is contained in:
Dylan K. Taylor
2017-02-15 17:51:41 +00:00
parent f8b9a13440
commit abffe1297d
2 changed files with 28 additions and 24 deletions

View File

@ -1636,8 +1636,8 @@ abstract class Entity extends Location implements Metadatable{
if($this->chunk !== null){
$this->chunk->removeEntity($this);
}
if($this->level !== null){
$this->level->removeEntity($this);
if($this->getLevel() !== null){
$this->getLevel()->removeEntity($this);
}
}
}