1
0

Attempt at fixing crashes with disconnecting players

git-svn-id: http://mc-server.googlecode.com/svn/trunk@329 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com
2012-02-26 12:55:42 +00:00
parent 0e33c919dd
commit 7268a70902
6 changed files with 38 additions and 18 deletions

View File

@@ -125,18 +125,14 @@ void cPlayer::Initialize( cWorld* a_World )
cPlayer::~cPlayer(void)
{
SaveToDisk();
m_ClientHandle = 0;
m_ClientHandle = NULL;
CloseWindow(-1);
if( m_Inventory )
{
delete m_Inventory;
m_Inventory = 0;
}
if(m_CreativeInventory)
{
delete m_CreativeInventory;
}
delete m_Inventory;
m_Inventory = NULL;
delete m_CreativeInventory;
delete m_pState;
m_World->RemovePlayer( this );
}