mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-16 18:47:33 -05:00
#1312 Resolves issue with radio reference editor attempting to access county info for a site that has county ID set to 0 (ie no county specified). (#1379)
Co-authored-by: Dennis Sheirer <dsheirer@github.com>
This commit is contained in:
@@ -34,6 +34,11 @@ import io.github.dsheirer.rrapi.type.Type;
|
|||||||
import io.github.dsheirer.rrapi.type.Voice;
|
import io.github.dsheirer.rrapi.type.Voice;
|
||||||
import io.github.dsheirer.service.radioreference.RadioReference;
|
import io.github.dsheirer.service.radioreference.RadioReference;
|
||||||
import io.github.dsheirer.util.ThreadPool;
|
import io.github.dsheirer.util.ThreadPool;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Comparator;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import javafx.application.Platform;
|
import javafx.application.Platform;
|
||||||
import javafx.beans.binding.Bindings;
|
import javafx.beans.binding.Bindings;
|
||||||
import javafx.beans.property.IntegerProperty;
|
import javafx.beans.property.IntegerProperty;
|
||||||
@@ -55,12 +60,6 @@ import jiconfont.javafx.IconNode;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.Comparator;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Radio Reference editor for trunked radio systems
|
* Radio Reference editor for trunked radio systems
|
||||||
*/
|
*/
|
||||||
@@ -293,7 +292,13 @@ public class SystemEditor extends VBox
|
|||||||
List<EnrichedSite> enrichedSites = new ArrayList<>();
|
List<EnrichedSite> enrichedSites = new ArrayList<>();
|
||||||
for(Site site: sites)
|
for(Site site: sites)
|
||||||
{
|
{
|
||||||
CountyInfo countyInfo = mRadioReference.getService().getCountyInfo(site.getCountyId());
|
CountyInfo countyInfo = null;
|
||||||
|
|
||||||
|
if(site.getCountyId() > 0)
|
||||||
|
{
|
||||||
|
countyInfo = mRadioReference.getService().getCountyInfo(site.getCountyId());
|
||||||
|
}
|
||||||
|
|
||||||
enrichedSites.add(new EnrichedSite(site, countyInfo));
|
enrichedSites.add(new EnrichedSite(site, countyInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user