fix NPE
This commit is contained in:
@@ -173,7 +173,7 @@ public class PowerPlayAnalyzator {
|
|||||||
public static Stream<IntersectData> getNearExpansions(Stream<Place> starSystems, Collection<Place> centers, double maxDistance){
|
public static Stream<IntersectData> getNearExpansions(Stream<Place> starSystems, Collection<Place> centers, double maxDistance){
|
||||||
IntersectsMapper mapper = new IntersectsMapper(centers, maxDistance, false, true);
|
IntersectsMapper mapper = new IntersectsMapper(centers, maxDistance, false, true);
|
||||||
return starSystems.filter(new FarDropper(centers, maxDistance))
|
return starSystems.filter(new FarDropper(centers, maxDistance))
|
||||||
.filter(p -> p.getPowerState().isExpansion())
|
.filter(p -> p.getPowerState() != null && p.getPowerState().isExpansion())
|
||||||
.map(mapper)
|
.map(mapper)
|
||||||
.sorted(new DistanceComparator());
|
.sorted(new DistanceComparator());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user