Fixing another cppcheck issue.

This commit is contained in:
lotodore
2015-01-14 22:07:44 +01:00
parent 54eabb28c8
commit 8a000bdc2b
+9 -7
View File
@@ -3840,13 +3840,15 @@ void gameTableImpl::leaveCurrentNetworkGame()
void gameTableImpl::triggerVoteOnKick(int id)
{
assert(myStartWindow->getSession()->getCurrentGame());
PlayerList seatList = myStartWindow->getSession()->getCurrentGame()->getSeatsList();
int playerCount = static_cast<int>(seatList->size());
if (id < playerCount) {
PlayerListIterator pos = seatList->begin();
advance(pos, id);
myStartWindow->getSession()->startVoteKickPlayer((*pos)->getMyUniqueID());
if (myStartWindow->getSession()->getCurrentGame())
{
PlayerList seatList = myStartWindow->getSession()->getCurrentGame()->getSeatsList();
int playerCount = static_cast<int>(seatList->size());
if (id < playerCount) {
PlayerListIterator pos = seatList->begin();
advance(pos, id);
myStartWindow->getSession()->startVoteKickPlayer((*pos)->getMyUniqueID());
}
}
}