mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 00:07:30 +00:00
BlockFactory: fix potential crash
This commit is contained in:
parent
24405b63c1
commit
ac04911e88
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user