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/BrewingstandEntity.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/BlockEntities/BrewingstandEntity.cpp') diff --git a/src/BlockEntities/BrewingstandEntity.cpp b/src/BlockEntities/BrewingstandEntity.cpp index 27926c8df..464d175c9 100644 --- a/src/BlockEntities/BrewingstandEntity.cpp +++ b/src/BlockEntities/BrewingstandEntity.cpp @@ -65,7 +65,7 @@ bool cBrewingstandEntity::UsedBy(cPlayer * a_Player) { if (a_Player->GetWindow() != Window) { - a_Player->OpenWindow(Window); + a_Player->OpenWindow(*Window); } } -- cgit v1.2.3