mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-08 05:24:39 +01:00
avoid NPE (and log to root-cause it later)
This commit is contained in:
parent
37085b0ba1
commit
781da8ccb6
1 changed files with 5 additions and 2 deletions
|
@ -294,7 +294,8 @@ public class BoardView extends View implements BoardHandler, SyncedDraw {
|
||||||
public void startHandling( Activity parent, JNIThread thread,
|
public void startHandling( Activity parent, JNIThread thread,
|
||||||
CommsConnTypeSet connTypes )
|
CommsConnTypeSet connTypes )
|
||||||
{
|
{
|
||||||
Log.d( TAG, "startHandling(thread=%H)", thread );
|
Log.d( TAG, "startHandling(thread=%H, parent=%s)", thread, parent );
|
||||||
|
Assert.assertTrue( null != parent || !BuildConfig.DEBUG );
|
||||||
m_parent = parent;
|
m_parent = parent;
|
||||||
m_jniThread = thread;
|
m_jniThread = thread;
|
||||||
m_jniGamePtr = thread.getGamePtr();
|
m_jniGamePtr = thread.getGamePtr();
|
||||||
|
@ -339,7 +340,9 @@ public class BoardView extends View implements BoardHandler, SyncedDraw {
|
||||||
// Force update now that we have bits to copy. I don't know why (yet),
|
// Force update now that we have bits to copy. I don't know why (yet),
|
||||||
// but on older versions of Android we need to run this even if drew
|
// but on older versions of Android we need to run this even if drew
|
||||||
// is false
|
// is false
|
||||||
m_parent.runOnUiThread( m_invalidator );
|
if ( null != m_parent ) {
|
||||||
|
m_parent.runOnUiThread( m_invalidator );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void dimsChanged( BoardDims dims )
|
public void dimsChanged( BoardDims dims )
|
||||||
|
|
Loading…
Reference in a new issue