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/DropSpenserEntity.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/BlockEntities/DropSpenserEntity.cpp') diff --git a/src/BlockEntities/DropSpenserEntity.cpp b/src/BlockEntities/DropSpenserEntity.cpp index a7cea4256..e2e40148b 100644 --- a/src/BlockEntities/DropSpenserEntity.cpp +++ b/src/BlockEntities/DropSpenserEntity.cpp @@ -153,7 +153,7 @@ bool cDropSpenserEntity::UsedBy(cPlayer * a_Player) { if (a_Player->GetWindow() != Window) { - a_Player->OpenWindow(Window); + a_Player->OpenWindow(*Window); } } return true; -- cgit v1.2.3