Fixing another cppcheck issue.

This commit is contained in:
lotodore
2015-01-14 22:07:44 +01:00
parent 54eabb28c8
commit 8a000bdc2b
+3 -1
View File
@@ -3840,7 +3840,8 @@ void gameTableImpl::leaveCurrentNetworkGame()
void gameTableImpl::triggerVoteOnKick(int id)
{
assert(myStartWindow->getSession()->getCurrentGame());
if (myStartWindow->getSession()->getCurrentGame())
{
PlayerList seatList = myStartWindow->getSession()->getCurrentGame()->getSeatsList();
int playerCount = static_cast<int>(seatList->size());
if (id < playerCount) {
@@ -3848,6 +3849,7 @@ void gameTableImpl::triggerVoteOnKick(int id)
advance(pos, id);
myStartWindow->getSession()->startVoteKickPlayer((*pos)->getMyUniqueID());
}
}
}
void gameTableImpl::startVoteOnKick(unsigned playerId, unsigned voteStarterPlayerId, int timeoutSec, int numVotesNeededToKick)