Fixing nasty bugs found with the help of cppcheck. This should be backported to the current server asap.

This commit is contained in:
lotodore
2011-02-08 16:41:46 +00:00
parent 55a5903142
commit c55c003f1f
2 changed files with 9 additions and 5 deletions
+3 -2
View File
@@ -847,8 +847,9 @@ ServerGame::RemoveDisconnectedPlayers()
// This should only be called between hands.
if (m_game)
{
PlayerListIterator i = m_game->getSeatsList()->begin();
PlayerListIterator end = m_game->getSeatsList()->end();
PlayerList tmpList(m_game->getSeatsList());
PlayerListIterator i = tmpList->begin();
PlayerListIterator end = tmpList->end();
while (i != end)
{
boost::shared_ptr<PlayerInterface> tmpPlayer = *i;