Skip to content

Commit

Permalink
#2020 P25 channel null frequency band error. (#2021)
Browse files Browse the repository at this point in the history
Co-authored-by: Dennis Sheirer <[email protected]>
  • Loading branch information
DSheirer and Dennis Sheirer authored Oct 16, 2024
1 parent 024a624 commit 54a0ca5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,12 @@ public APCO25Channel decorateAs(int requestedTimeslot)
}

P25Channel decoratedChannel = new P25Channel(existing.getBandIdentifier(), channelNumber);
decoratedChannel.setFrequencyBand(existing.getFrequencyBand());

if(existing.getFrequencyBand() != null)
{
decoratedChannel.setFrequencyBand(existing.getFrequencyBand());
}

return new APCO25Channel(decoratedChannel);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public int[] getFrequencyBandIdentifiers()
@Override
public void setFrequencyBand(IFrequencyBand frequencyBand)
{
if(frequencyBand.getIdentifier() == getDownlinkBandIdentifier())
if(frequencyBand != null && frequencyBand.getIdentifier() == getDownlinkBandIdentifier())
{
mFrequencyBand = frequencyBand;
}
Expand Down

0 comments on commit 54a0ca5

Please sign in to comment.