Index: client/Client/main.cpp
===================================================================
--- client/Client/main.cpp	(revision 11ad6fb50d7bf12d0ef5940597928bc9af2b71d9)
+++ client/Client/main.cpp	(revision dfb93639f1daef3228d1d6099aca6d510bd80be0)
@@ -657,4 +657,6 @@
 void processMessage(NETWORK_MSG &msg, int &state, chat &chatConsole, map<unsigned int, Player*>& mapPlayers, unsigned int& curPlayerId)
 {
+   cout << "Total players in map: " << mapPlayers.size() << endl;
+
    // this is outdated since most messages now don't contain just a text string
    string response = string(msg.buffer);
@@ -737,4 +739,6 @@
                if (playerId == curPlayerId)
                {
+                  cout << "Got logout message for self" << endl;
+
                   if (response.compare("You have successfully logged out.") == 0)
                   {
@@ -749,4 +753,5 @@
                {
                   delete mapPlayers[playerId];
+                  mapPlayers.erase(playerId);
                }
 
@@ -963,5 +968,5 @@
                break;
             }
-             case MSG_TYPE_LOGOUT:
+            case MSG_TYPE_LOGOUT:
             {
                cout << "Got a logout message" << endl;
@@ -975,6 +980,8 @@
                if (playerId == curPlayerId)
                   cout << "Received MSG_TYPE_LOGOUT for self in STATE_GAME. This shouldn't happen." << endl;
-               else
+               else {
                   delete mapPlayers[playerId];
+                  mapPlayers.erase(playerId);
+               }
 
                break;
