mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
fix linux crash when timers enabled: clear timer while taking down board
This commit is contained in:
parent
fc6d6ec707
commit
9fa9ba643f
1 changed files with 9 additions and 0 deletions
|
@ -99,6 +99,8 @@ static void invalTradeWindow( BoardCtxt* board, XP_S16 turn, XP_Bool redraw );
|
|||
static XP_Bool invalCellsWithTiles( BoardCtxt* board );
|
||||
|
||||
static void setTimerIf( BoardCtxt* board );
|
||||
static void clearTimerIf( const BoardCtxt* board );
|
||||
|
||||
static XP_Bool p_board_timerFired( void* closure, XWTimerReason why );
|
||||
|
||||
static XP_Bool replaceLastTile( BoardCtxt* board );
|
||||
|
@ -193,6 +195,7 @@ board_make( MPFORMAL ModelCtxt* model, ServerCtxt* server, DrawCtx* draw,
|
|||
void
|
||||
board_destroy( BoardCtxt* board )
|
||||
{
|
||||
clearTimerIf( board );
|
||||
XP_FREE( board->mpool, board );
|
||||
} /* board_destroy */
|
||||
|
||||
|
@ -1234,6 +1237,12 @@ setTimerIf( BoardCtxt* board )
|
|||
}
|
||||
} /* setTimerIf */
|
||||
|
||||
static void
|
||||
clearTimerIf( const BoardCtxt* board )
|
||||
{
|
||||
util_clearTimer( board->util, TIMER_TIMERTICK );
|
||||
}
|
||||
|
||||
static void
|
||||
timerFiredForTimer( BoardCtxt* board )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue