mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
fix occasional crash: null-out ptrs after deleting what they point to.
This commit is contained in:
parent
4baa620298
commit
6c9c013f1a
1 changed files with 6 additions and 2 deletions
|
@ -248,11 +248,13 @@ game_dispose( XWGame* game )
|
||||||
/* The board should be reused!!! PENDING(ehouse) */
|
/* The board should be reused!!! PENDING(ehouse) */
|
||||||
if ( !!game->board ) {
|
if ( !!game->board ) {
|
||||||
board_destroy( game->board );
|
board_destroy( game->board );
|
||||||
|
game->board = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef XWFEATURE_STANDALONE_ONLY
|
#ifndef XWFEATURE_STANDALONE_ONLY
|
||||||
if ( !!game->comms ) {
|
if ( !!game->comms ) {
|
||||||
comms_destroy( game->comms );
|
comms_destroy( game->comms );
|
||||||
|
game->comms = NULL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if ( !!game->model ) {
|
if ( !!game->model ) {
|
||||||
|
@ -261,9 +263,11 @@ game_dispose( XWGame* game )
|
||||||
dict_destroy( dict );
|
dict_destroy( dict );
|
||||||
}
|
}
|
||||||
model_destroy( game->model );
|
model_destroy( game->model );
|
||||||
|
game->model = NULL;
|
||||||
}
|
}
|
||||||
if ( !!game->server ) {
|
if ( !!game->server ) {
|
||||||
server_destroy( game->server );
|
server_destroy( game->server );
|
||||||
|
game->server = NULL;
|
||||||
}
|
}
|
||||||
} /* game_dispose */
|
} /* game_dispose */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue