summaryrefslogtreecommitdiffstats
path: root/src/ClientHandle.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-20 11:46:45 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-20 11:46:45 +0200
commit6ab9afd0fd808fad99cd8387c72ce461c37aef80 (patch)
treec7fdd4f7cdc75b4958c297e55e2801510654ee76 /src/ClientHandle.cpp
parentFix failed merge and other issues (diff)
downloadcuberite-6ab9afd0fd808fad99cd8387c72ce461c37aef80.tar
cuberite-6ab9afd0fd808fad99cd8387c72ce461c37aef80.tar.gz
cuberite-6ab9afd0fd808fad99cd8387c72ce461c37aef80.tar.bz2
cuberite-6ab9afd0fd808fad99cd8387c72ce461c37aef80.tar.lz
cuberite-6ab9afd0fd808fad99cd8387c72ce461c37aef80.tar.xz
cuberite-6ab9afd0fd808fad99cd8387c72ce461c37aef80.tar.zst
cuberite-6ab9afd0fd808fad99cd8387c72ce461c37aef80.zip
Diffstat (limited to 'src/ClientHandle.cpp')
-rw-r--r--src/ClientHandle.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp
index f90da94dd..8caaae917 100644
--- a/src/ClientHandle.cpp
+++ b/src/ClientHandle.cpp
@@ -120,6 +120,8 @@ cClientHandle::~cClientHandle()
}
if (World != NULL)
{
+ m_Player->SetWorldTravellingFrom(NULL); // Make sure that the player entity is actually removed
+ World->RemovePlayer(m_Player); // Must be called before cPlayer::Destroy() as otherwise cChunk tries to delete the player, and then we do it again
m_Player->Destroy();
}
delete m_Player;