mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 16:47:31 -05:00
Resolved issue with throwing a runtime exception when the state monitor
was null.
This commit is contained in:
@@ -180,7 +180,7 @@ public class ChannelState extends Module implements ICallEventProvider,
|
||||
{
|
||||
if( mMonitoring.compareAndSet( false, true ) )
|
||||
{
|
||||
if( mRunningMonitor == null )
|
||||
if( mRunningMonitor == null && mStateMonitor != null )
|
||||
{
|
||||
mRunningMonitor = mThreadPoolManager.scheduleFixedRate(
|
||||
ThreadType.DECODER, mStateMonitor, 20, TimeUnit.MILLISECONDS );
|
||||
@@ -205,11 +205,6 @@ public class ChannelState extends Module implements ICallEventProvider,
|
||||
{
|
||||
mThreadPoolManager.cancel( mRunningMonitor );
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new RuntimeException( "Channel state monitor's scheduled "
|
||||
+ "future pointer was null when trying to stop the monitor" );
|
||||
}
|
||||
|
||||
mRunningMonitor = null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user