From 7922e6addb06de89cc73c64d30321aa6710e30ce Mon Sep 17 00:00:00 2001 From: Lukas Pioch Date: Mon, 29 May 2017 21:33:30 +0200 Subject: Fixes problems with windows: - Changed cPlayer:OpenWindow to accept a ref, tolua adds a nil check - Close open lua window in destructor, to avoid dangling pointers --- src/BlockEntities/BeaconEntity.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/BlockEntities/BeaconEntity.cpp') diff --git a/src/BlockEntities/BeaconEntity.cpp b/src/BlockEntities/BeaconEntity.cpp index c158db53b..f7728600a 100644 --- a/src/BlockEntities/BeaconEntity.cpp +++ b/src/BlockEntities/BeaconEntity.cpp @@ -297,7 +297,7 @@ bool cBeaconEntity::UsedBy(cPlayer * a_Player) // if (a_Player->GetWindow() != Window) // -> Because mojang doesn't send a 'close window' packet when you click the cancel button in the beacon inventory ... { - a_Player->OpenWindow(Window); + a_Player->OpenWindow(*Window); } } return true; -- cgit v1.2.3