#2055 MultiFrequencyTunerChannelSource Null Pointer Error On Channel Source Shutdown - different solution to resolve possible memory leak with previous solution. Also fixes P25 issue where a traffic channel that doesn't get started is returned to the traffic channel pool. (#2070)

Co-authored-by: Dennis Sheirer <dsheirer@github.com>
This commit is contained in:
Denny Sheirer
2024-11-01 05:32:10 -04:00
committed by GitHub
parent 7509245751
commit df0d0468c8
3 changed files with 25 additions and 14 deletions

View File

@@ -153,19 +153,13 @@ public class MultiFrequencyTunerChannelSource extends TunerChannelSource
@Override
public void stop()
{
//Don't perform stop sequence if we haven't been started. There can be a small window on startup where the
//channel rotation monitor can get ahead of the channel source and cause it to try to stop and rotate before
//it has even started, causing an error in the polyphase channel source.
if(mStarted)
{
mStarted = false;
mStarted = false;
if(mTunerChannelSource != null)
{
mTunerChannelSource.stop();
mTunerChannelSource.removeSourceEventListener();
mTunerChannelSource = null;
}
if(mTunerChannelSource != null)
{
mTunerChannelSource.stop();
mTunerChannelSource.removeSourceEventListener();
mTunerChannelSource = null;
}
}