Fix NPE of POI empty creation
This commit is contained in:
parent
872efc0679
commit
ba5b9892c3
1 changed files with 5 additions and 3 deletions
|
@ -95,7 +95,7 @@ public class IndexPoiCreator extends AbstractIndexPartCreator {
|
|||
Algoritms.removeAllFiles(poiIndexFile);
|
||||
}
|
||||
|
||||
private void checkEntity(Entity e) {
|
||||
public void checkEntity(Entity e) {
|
||||
String name = e.getTag(OSMTagKey.NAME);
|
||||
if (name == null) {
|
||||
String msg = "";
|
||||
|
@ -548,8 +548,10 @@ public class IndexPoiCreator extends AbstractIndexPartCreator {
|
|||
}
|
||||
} else {
|
||||
int sum = 0;
|
||||
for (Tree<T> t : subtrees) {
|
||||
sum += t.getSubTreesOnLevel(level - 1);
|
||||
if (subtrees != null) {
|
||||
for (Tree<T> t : subtrees) {
|
||||
sum += t.getSubTreesOnLevel(level - 1);
|
||||
}
|
||||
}
|
||||
return sum;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue