mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-31 19:57:06 +01:00
fix race-condition NPE by inspection
This commit is contained in:
parent
6a58a08bca
commit
0cc7d21ecb
1 changed files with 4 additions and 2 deletions
|
@ -115,7 +115,7 @@ public class BoardDelegate extends DelegateBase
|
|||
private BoardUtilCtxt m_utils;
|
||||
private boolean m_gameOver = false;
|
||||
|
||||
private JNIThread m_jniThread;
|
||||
private volatile JNIThread m_jniThread;
|
||||
private JNIThread m_jniThreadRef;
|
||||
private JNIThread.GameStateInfo m_gsi;
|
||||
|
||||
|
@ -1817,7 +1817,9 @@ public class BoardDelegate extends DelegateBase
|
|||
@Override
|
||||
public boolean engineProgressCallback()
|
||||
{
|
||||
return ! m_jniThread.busy();
|
||||
// return true if engine should keep going
|
||||
JNIThread jnit = m_jniThread;
|
||||
return jnit != null && !jnit.busy();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue