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);
|
Algoritms.removeAllFiles(poiIndexFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkEntity(Entity e) {
|
public void checkEntity(Entity e) {
|
||||||
String name = e.getTag(OSMTagKey.NAME);
|
String name = e.getTag(OSMTagKey.NAME);
|
||||||
if (name == null) {
|
if (name == null) {
|
||||||
String msg = "";
|
String msg = "";
|
||||||
|
@ -548,9 +548,11 @@ public class IndexPoiCreator extends AbstractIndexPartCreator {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
int sum = 0;
|
int sum = 0;
|
||||||
|
if (subtrees != null) {
|
||||||
for (Tree<T> t : subtrees) {
|
for (Tree<T> t : subtrees) {
|
||||||
sum += t.getSubTreesOnLevel(level - 1);
|
sum += t.getSubTreesOnLevel(level - 1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return sum;
|
return sum;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue