mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-04 20:46:28 +01:00
test for null object before calling method
This commit is contained in:
parent
7cef230e2c
commit
cf77872dd4
1 changed files with 5 additions and 3 deletions
|
@ -808,14 +808,16 @@ public class BoardActivity extends XWActivity
|
||||||
// BTService.BTEventListener interface
|
// BTService.BTEventListener interface
|
||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
@Override
|
@Override
|
||||||
|
@SuppressWarnings("fallthrough")
|
||||||
public void eventOccurred( BTService.BTEvent event, final Object ... args )
|
public void eventOccurred( BTService.BTEvent event, final Object ... args )
|
||||||
{
|
{
|
||||||
switch( event ) {
|
switch( event ) {
|
||||||
case MESSAGE_ACCEPTED:
|
case MESSAGE_ACCEPTED:
|
||||||
m_jniThread.handle( JNICmd.CMD_DRAW_BT_STATUS, true );
|
|
||||||
break;
|
|
||||||
case MESSAGE_REFUSED:
|
case MESSAGE_REFUSED:
|
||||||
m_jniThread.handle( JNICmd.CMD_DRAW_BT_STATUS, false );
|
if ( null != m_jniThread ) {
|
||||||
|
boolean accepted = BTService.BTEvent.MESSAGE_ACCEPTED == event;
|
||||||
|
m_jniThread.handle( JNICmd.CMD_DRAW_BT_STATUS, accepted );
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case MESSAGE_NOGAME:
|
case MESSAGE_NOGAME:
|
||||||
post( new Runnable() {
|
post( new Runnable() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue