mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-15 15:41:24 +01:00
separate internalization of comms from call to connect to relay since
the first must finish before the caller will have a valid reference to comms.
This commit is contained in:
parent
de4af7c8ce
commit
0629dc5223
1 changed files with 6 additions and 3 deletions
|
@ -166,9 +166,12 @@ game_makeFromStream( MPFORMAL XWStreamCtxt* stream, XWGame* game,
|
|||
|
||||
#ifndef XWFEATURE_STANDALONE_ONLY
|
||||
hasComms = stream_getU8( stream );
|
||||
game->comms = hasComms?
|
||||
comms_makeFromStream( MPPARM(mpool) stream, util, sendProc, closure ):
|
||||
(CommsCtxt*)NULL;
|
||||
if ( hasComms ) {
|
||||
game->comms = comms_makeFromStream( MPPARM(mpool) stream, util, sendProc, closure );
|
||||
comms_init( game->comms );
|
||||
} else {
|
||||
game->comms = NULL;
|
||||
}
|
||||
#endif
|
||||
game->model = model_makeFromStream( MPPARM(mpool) stream, dict, util );
|
||||
|
||||
|
|
Loading…
Reference in a new issue