Payout button disabled until croupier has been set
Fixed potential segfault on startup if focusedPlayer_ is out of bounds.
This commit is contained in:
parent
256d3740f9
commit
fd7a8fbd8a
2 changed files with 49 additions and 8 deletions
|
@ -8,6 +8,7 @@ PlayerAreaModel::PlayerAreaModel(QObject *parent)
|
|||
for(int i = 0; i < 8; i++){
|
||||
players.append(defaultValues);
|
||||
}
|
||||
focusedPlayer_ = 1;
|
||||
}
|
||||
|
||||
uint PlayerAreaModel::focusedPlayer()
|
||||
|
@ -85,7 +86,7 @@ void PlayerAreaModel::cancelBet(BetType b, int n)
|
|||
void PlayerAreaModel::payout()
|
||||
{
|
||||
if (players.at(0).bet1.betType == NONE) {
|
||||
printf("Select where the ball landed\n");
|
||||
fprintf(stderr, "Select where the ball landed\n");
|
||||
} else {
|
||||
int rollSpot = 36 - players.at(0).bet1.betSpot;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue