mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-18 20:14:31 +00:00
BlockFactory: fix potential crash
This commit is contained in:
@@ -917,7 +917,7 @@ class BlockFactory{
|
||||
$index = ($id << 4) | $meta;
|
||||
if($this->isRegistered($id, $meta)){
|
||||
$existing = $this->fullList[$index];
|
||||
if($existing->getFullId() === $index){
|
||||
if($existing !== null && $existing->getFullId() === $index){
|
||||
throw new \InvalidArgumentException("$id:$meta is already mapped");
|
||||
}else{
|
||||
//if it's not a match, this was already remapped for some reason; remapping overwrites are OK
|
||||
|
Reference in New Issue
Block a user