mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-15 15:41:24 +01:00
work around old unstarted games where gi only was saved
I think....
This commit is contained in:
parent
f74db30a5d
commit
5c40f175bb
2 changed files with 12 additions and 8 deletions
|
@ -407,16 +407,19 @@ public class GameUtils {
|
|||
postMoveDroppedForDictNotification( context, rowid, gi.gameID,
|
||||
gi.isoCode() );
|
||||
} else {
|
||||
String langName = gi.langName( context );
|
||||
gamePtr = XwJNI.initFromStream( rowid, stream, gi, util, null,
|
||||
CommonPrefs.get(context),
|
||||
tp );
|
||||
CommonPrefs.get(context), tp );
|
||||
if ( null == gamePtr ) {
|
||||
Assert.assertTrueNR( gi.serverRole != DeviceRole.SERVER_ISCLIENT );
|
||||
CommsAddrRec selfAddr = CommsAddrRec.getSelfAddr( context, gi );
|
||||
gamePtr = XwJNI.initNew( gi, selfAddr, (CommsAddrRec)null,
|
||||
(UtilCtxt)null, (DrawCtx)null,
|
||||
CommonPrefs.get(context), null );
|
||||
// Assert.assertTrueNR( gi.serverRole != DeviceRole.SERVER_ISCLIENT ); // firing
|
||||
if ( DeviceRole.SERVER_ISCLIENT == gi.serverRole ) {
|
||||
Log.e( TAG, "bad game? ISCLIENT, but has no host address"
|
||||
+ " and won't open" );
|
||||
} else {
|
||||
CommsAddrRec selfAddr = CommsAddrRec.getSelfAddr( context, gi );
|
||||
gamePtr = XwJNI.initNew( gi, selfAddr, (CommsAddrRec)null,
|
||||
(UtilCtxt)null, (DrawCtx)null,
|
||||
CommonPrefs.get(context), null );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -378,6 +378,7 @@ game_makeFromStream( MPFORMAL XWEnv xwe, XWStreamCtxt* stream,
|
|||
procs, onRoleChanged, game,
|
||||
gi->forceChannel );
|
||||
} else {
|
||||
XP_ASSERT( NULL == game->comms );
|
||||
game->comms = NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue