mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
Player: fixed removeWindow() sometimes removing GUI / crashing clients
This commit is contained in:
parent
79b7e08e60
commit
0c3b136a8d
@ -3904,8 +3904,8 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
||||
throw new \InvalidArgumentException("Cannot remove fixed window $id (" . get_class($inventory) . ") from " . $this->getName());
|
||||
}
|
||||
|
||||
$inventory->close($this);
|
||||
if($id !== null){
|
||||
$inventory->close($this);
|
||||
unset($this->windows[$hash], $this->windowIndex[$id], $this->permanentWindows[$id]);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user