fix NPE in RegionAddressRepositoryBinary

This commit is contained in:
sonora 2015-01-14 22:24:58 +01:00
parent b77d9109e7
commit 3cda17468b

View file

@ -129,9 +129,11 @@ public class RegionAddressRepositoryBinary implements RegionAddressRepository {
@Override @Override
public synchronized void preloadStreets(City o, ResultMatcher<Street> resultMatcher) { public synchronized void preloadStreets(City o, ResultMatcher<Street> resultMatcher) {
Collection<Street> streets = o.getStreets(); if (o!=null) {
if(!streets.isEmpty()){ Collection<Street> streets = o.getStreets();
return; if(!streets.isEmpty()){
return;
}
} }
try { try {
file.preloadStreets(o, BinaryMapIndexReader.buildAddressRequest(resultMatcher)); file.preloadStreets(o, BinaryMapIndexReader.buildAddressRequest(resultMatcher));