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
This commit is contained in:
@@ -1222,7 +1222,7 @@ void cMinecartWithChest::OnRightClicked(cPlayer & a_Player)
|
||||
{
|
||||
if (a_Player.GetWindow() != Window)
|
||||
{
|
||||
a_Player.OpenWindow(Window);
|
||||
a_Player.OpenWindow(*Window);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user