#2020 P25 channel null frequency band error. (#2021)

Co-authored-by: Dennis Sheirer <dsheirer@github.com>
This commit is contained in:
Denny Sheirer
2024-10-16 02:59:55 -04:00
committed by GitHub
parent 024a624083
commit 54a0ca5247
2 changed files with 7 additions and 2 deletions

View File

@@ -135,7 +135,12 @@ public class APCO25Channel extends Identifier<P25Channel> implements IChannelDes
}
P25Channel decoratedChannel = new P25Channel(existing.getBandIdentifier(), channelNumber);
decoratedChannel.setFrequencyBand(existing.getFrequencyBand());
if(existing.getFrequencyBand() != null)
{
decoratedChannel.setFrequencyBand(existing.getFrequencyBand());
}
return new APCO25Channel(decoratedChannel);
}

View File

@@ -134,7 +134,7 @@ public class P25Channel implements IChannelDescriptor
@Override
public void setFrequencyBand(IFrequencyBand frequencyBand)
{
if(frequencyBand.getIdentifier() == getDownlinkBandIdentifier())
if(frequencyBand != null && frequencyBand.getIdentifier() == getDownlinkBandIdentifier())
{
mFrequencyBand = frequencyBand;
}