*Cleanup about deleting player.

--HG--
branch : trunk
This commit is contained in:
megamage committed 2009-08-10 23:32:20 -05:00
1 parent 4ecbefabfa
commit 31374835f6
4 files changed
+6 -20

No files matched your search

+1
View File
@@ -387,6 +387,7 @@ void WorldSession::LogoutPlayer(bool Save)
// the player may not be in the world when logging out
// e.g if he got disconnected during a transfer to another map
// calls to GetMap in this case may cause crashes
_player->CleanupsBeforeDelete();
Map* _map = _player->GetMap();
_map->Remove(_player, true);
_player = NULL; // deleted in Remove call