mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 09:26:06 +00:00
InventoryManager: ensure the windowID is valid before attempting to remove any window
this is currently a harmless bug, since remove() isn't currently doing any heavy lifting.
This commit is contained in:
@ -259,7 +259,7 @@ class InventoryManager{
|
|||||||
|
|
||||||
public function onClientRemoveWindow(int $id) : void{
|
public function onClientRemoveWindow(int $id) : void{
|
||||||
if($id === $this->lastInventoryNetworkId){
|
if($id === $this->lastInventoryNetworkId){
|
||||||
if($id !== $this->pendingCloseWindowId){
|
if(isset($this->windowMap[$id]) && $id !== $this->pendingCloseWindowId){
|
||||||
$this->remove($id);
|
$this->remove($id);
|
||||||
$this->player->removeCurrentWindow();
|
$this->player->removeCurrentWindow();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user