Fixed NPE for RoutingContext

This commit is contained in:
PaulStets 2018-05-21 11:06:12 +03:00
parent 52020488b8
commit ef67ba4712

View file

@ -957,7 +957,10 @@ public class ResourceManager {
List<BinaryMapIndexReader> readers = new ArrayList<>(fileReaders.size());
for(BinaryMapReaderResource r : fileReaders.values()) {
if(r.isUseForRouting()) {
readers.add(r.getReader(BinaryMapReaderResourceType.ROUTING));
BinaryMapIndexReader reader = r.getReader(BinaryMapReaderResourceType.ROUTING);
if (reader != null) {
readers.add(reader);
}
}
}
return readers.toArray(new BinaryMapIndexReader[readers.size()]);