Skip to content

Commit

Permalink
Merge pull request #324 from Insprill/fix/filter-error
Browse files Browse the repository at this point in the history
Fix rare NPE when filtering chunks
  • Loading branch information
Querz committed Feb 19, 2022
2 parents 91ef192 + 85eef0a commit f8554ee
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ public boolean execute() {
try {
Region region = Region.loadRegion(getRegionDirectories(), regionData, poiData, entitiesData);

if (region.getRegion() == null) {
progressChannel.incrementProgress(getRegionDirectories().getLocationAsFileName());
return true;
}

LongOpenHashSet chunks = region.getFilteredChunks(filter, this.selection);
if (chunks.size() > 0) {
if (chunks.size() == Tile.CHUNKS) {
Expand Down

0 comments on commit f8554ee

Please sign in to comment.