Skip to content

Commit

Permalink
catch empty box ids list
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickbr committed May 6, 2024
1 parent 06d6e0f commit 52656e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/spatialjoin/BoxIds.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,9 @@ inline std::pair<int32_t, int32_t> boxIdIsect(const BoxIdList& idsA,
size_t fullContained = 0;
size_t partContained = 0;

// catch empty box ids
if (idsA.size() < 2 || idsB.size() < 2) return {0, 0};

// shortcuts
if (abs(idsA[1].first) > abs(idsB.back().first) + idsB.back().second) {
return {fullContained, partContained};
Expand Down
2 changes: 1 addition & 1 deletion src/util
Submodule util updated 2 files
+8 −2 geo/Geo.h
+2 −2 geo/Line.h

0 comments on commit 52656e1

Please sign in to comment.