mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-11 12:27:51 +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:
parent
ed7c95549d
commit
def2f8c145
@ -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();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user