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/ChestEntity.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/BlockEntities/ChestEntity.cpp') diff --git a/src/BlockEntities/ChestEntity.cpp b/src/BlockEntities/ChestEntity.cpp index a47593108..9aeb50d5b 100644 --- a/src/BlockEntities/ChestEntity.cpp +++ b/src/BlockEntities/ChestEntity.cpp @@ -101,7 +101,7 @@ bool cChestEntity::UsedBy(cPlayer * a_Player) { if (a_Player->GetWindow() != Window) { - a_Player->OpenWindow(Window); + a_Player->OpenWindow(*Window); } } -- cgit v1.2.3