mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-27 07:58:49 +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
|
||||
//////////////////////////////////////////////////
|
||||
@Override
|
||||
@SuppressWarnings("fallthrough")
|
||||
public void eventOccurred( BTService.BTEvent event, final Object ... args )
|
||||
{
|
||||
switch( event ) {
|
||||
case MESSAGE_ACCEPTED:
|
||||
m_jniThread.handle( JNICmd.CMD_DRAW_BT_STATUS, true );
|
||||
break;
|
||||
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;
|
||||
case MESSAGE_NOGAME:
|
||||
post( new Runnable() {
|
||||
|
|
Loading…
Add table
Reference in a new issue