From 0c3b136a8df4f3a37ca80636f9aa6ac3caf453d7 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 24 Feb 2019 12:14:19 +0000 Subject: [PATCH] Player: fixed removeWindow() sometimes removing GUI / crashing clients --- src/pocketmine/Player.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 4c360e657..00b188484 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -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]); } }