mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-03 23:04:08 +01:00
fix crash: check that tile exists before removing
This commit is contained in:
parent
0f18efb925
commit
93a621c65c
1 changed files with 21 additions and 20 deletions
|
@ -1027,9 +1027,9 @@ model_moveBoardToTray( ModelCtxt* model, XP_S16 turn,
|
|||
}
|
||||
}
|
||||
|
||||
/* may be legal to fail to find, but we'd better return now! */
|
||||
XP_ASSERT( index < player->nPending );
|
||||
|
||||
/* if we're called from putBackOtherPlayersTiles there may be nothing
|
||||
here */
|
||||
if ( index < player->nPending ) {
|
||||
decrPendingTileCountAt( model, col, row );
|
||||
notifyBoardListeners( model, turn, col, row, XP_FALSE );
|
||||
|
||||
|
@ -1050,6 +1050,7 @@ model_moveBoardToTray( ModelCtxt* model, XP_S16 turn,
|
|||
}
|
||||
|
||||
invalidateScore( model, turn );
|
||||
}
|
||||
} /* model_moveBoardToTray */
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue