more valgrind fixes

This commit is contained in:
Eric House 2018-04-14 10:17:12 -07:00
parent 05892c630e
commit 317df71588
3 changed files with 3 additions and 3 deletions

View file

@ -75,8 +75,8 @@ p_dict_unref( DictionaryCtxt* dict
#endif
pthread_mutex_unlock( &dict->mutex );
if ( 0 == dict->refCount ) {
(*dict->destructor)( dict );
pthread_mutex_destroy( &dict->mutex );
(*dict->destructor)( dict );
}
}
}

View file

@ -2537,7 +2537,7 @@ server_getCurrentTurn( ServerCtxt* server, XP_Bool* isLocal )
{
XP_S16 turn = server->nv.currentTurn;
if ( NULL != isLocal && turn >= 0 ) {
*isLocal = server->vol.gi->players[turn].isLocal;
*isLocal = server->vol.gi->players[turn].isLocal;
}
return turn;
} /* server_getCurrentTurn */

View file

@ -204,7 +204,7 @@ summarize( CommonGlobals* cGlobals )
const XWGame* game = &cGlobals->game;
XP_S16 nMoves = model_getNMoves( game->model );
XP_Bool gameOver = server_getGameIsOver( game->server );
XP_Bool isLocal;
XP_Bool isLocal = -1;
XP_S16 turn = server_getCurrentTurn( game->server, &isLocal );
XP_U32 lastMoveTime = server_getLastMoveTime( game->server );
XP_U16 seed = 0;