mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-09 22:00:39 +01:00
don't try to use null gamePtr. Happens when relay moves arrive for a
game whose dict has been deleted.
This commit is contained in:
parent
bffb231d13
commit
9f5a64ee50
1 changed files with 17 additions and 16 deletions
|
@ -708,26 +708,27 @@ public class GameUtils {
|
||||||
CurGameInfo gi = new CurGameInfo( context );
|
CurGameInfo gi = new CurGameInfo( context );
|
||||||
FeedUtilsImpl feedImpl = new FeedUtilsImpl( context, rowid );
|
FeedUtilsImpl feedImpl = new FeedUtilsImpl( context, rowid );
|
||||||
int gamePtr = loadMakeGame( context, gi, feedImpl, sink, lock );
|
int gamePtr = loadMakeGame( context, gi, feedImpl, sink, lock );
|
||||||
|
if ( 0 != gamePtr ) {
|
||||||
XwJNI.comms_resendAll( gamePtr, false, false );
|
XwJNI.comms_resendAll( gamePtr, false, false );
|
||||||
|
|
||||||
if ( null != msgs ) {
|
if ( null != msgs ) {
|
||||||
for ( byte[] msg : msgs ) {
|
for ( byte[] msg : msgs ) {
|
||||||
draw = XwJNI.game_receiveMessage( gamePtr, msg, ret )
|
draw = XwJNI.game_receiveMessage( gamePtr, msg, ret )
|
||||||
|| draw;
|
|| draw;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
XwJNI.comms_ackAny( gamePtr );
|
||||||
XwJNI.comms_ackAny( gamePtr );
|
|
||||||
|
|
||||||
// update gi to reflect changes due to messages
|
// update gi to reflect changes due to messages
|
||||||
XwJNI.game_getGi( gamePtr, gi );
|
XwJNI.game_getGi( gamePtr, gi );
|
||||||
saveGame( context, gamePtr, gi, lock, false );
|
saveGame( context, gamePtr, gi, lock, false );
|
||||||
summarizeAndClose( context, lock, gamePtr, gi, feedImpl );
|
summarizeAndClose( context, lock, gamePtr, gi, feedImpl );
|
||||||
|
|
||||||
int flags = setFromFeedImpl( feedImpl );
|
int flags = setFromFeedImpl( feedImpl );
|
||||||
if ( GameSummary.MSG_FLAGS_NONE != flags ) {
|
if ( GameSummary.MSG_FLAGS_NONE != flags ) {
|
||||||
draw = true;
|
draw = true;
|
||||||
DBUtils.setMsgFlags( rowid, flags );
|
DBUtils.setMsgFlags( rowid, flags );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
lock.unlock();
|
lock.unlock();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue