mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-07 20:46:17 +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 BoardUtilCtxt m_utils;
|
||||||
private boolean m_gameOver = false;
|
private boolean m_gameOver = false;
|
||||||
|
|
||||||
private JNIThread m_jniThread;
|
private volatile JNIThread m_jniThread;
|
||||||
private JNIThread m_jniThreadRef;
|
private JNIThread m_jniThreadRef;
|
||||||
private JNIThread.GameStateInfo m_gsi;
|
private JNIThread.GameStateInfo m_gsi;
|
||||||
|
|
||||||
|
@ -1817,7 +1817,9 @@ public class BoardDelegate extends DelegateBase
|
||||||
@Override
|
@Override
|
||||||
public boolean engineProgressCallback()
|
public boolean engineProgressCallback()
|
||||||
{
|
{
|
||||||
return ! m_jniThread.busy();
|
// return true if engine should keep going
|
||||||
|
JNIThread jnit = m_jniThread;
|
||||||
|
return jnit != null && !jnit.busy();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Add table
Reference in a new issue