mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-23 07:27:22 +01:00
fix NPE
It happened when too many timers were firing, but I think this code's better anyway.
This commit is contained in:
parent
271d43808f
commit
3dbec328af
1 changed files with 9 additions and 6 deletions
|
@ -1131,13 +1131,16 @@ public class BTService extends XWService {
|
|||
|
||||
private void stopListener()
|
||||
{
|
||||
m_listener.stopListening();
|
||||
try {
|
||||
m_listener.join( 100 );
|
||||
} catch ( InterruptedException ie ) {
|
||||
Log.ex( TAG, ie );
|
||||
BTListenerThread listener = m_listener;
|
||||
if ( listener != null ) {
|
||||
m_listener = null;
|
||||
listener.stopListening();
|
||||
try {
|
||||
listener.join( 100 );
|
||||
} catch ( InterruptedException ie ) {
|
||||
Log.ex( TAG, ie );
|
||||
}
|
||||
}
|
||||
m_listener = null;
|
||||
}
|
||||
|
||||
private void stopSender()
|
||||
|
|
Loading…
Add table
Reference in a new issue