From e9ccf5a30521cfdb8c43cc996ffa92e7c4a9f373 Mon Sep 17 00:00:00 2001 From: Eric House Date: Wed, 4 Mar 2015 06:49:52 -0800 Subject: [PATCH] fix crash copying game (by replacing assertion with a stricter one) --- .../src/org/eehouse/android/xw4/jni/GameSummary.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/GameSummary.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/GameSummary.java index e439b42e2..b82c95408 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/GameSummary.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/GameSummary.java @@ -65,7 +65,7 @@ public class GameSummary { public DeviceRole serverRole; public int nPacketsPending; - private int m_giFlags; + private Integer m_giFlags; private String m_playersSummary; private CurGameInfo m_gi; private Context m_context; @@ -270,7 +270,7 @@ public class GameSummary { public void setGiFlags( int flags ) { - m_giFlags = flags; + m_giFlags = new Integer( flags ); } public String summarizePlayer( int indx ) @@ -326,7 +326,7 @@ public class GameSummary { boolean result = false; if ( !gameOver && 0 <= turn ) { // HACK!!! Need to fix so we ensure m_giFlags is set here - Assert.assertNotNull( m_gi ); + Assert.assertTrue( null != m_gi || null != m_giFlags ); result = localTurnNextImpl( giflags(), turn ); } return result;