Skip to content

Commit 796a535

Browse files
skip empty platforms to prevent crash
TODO: fix paged_vecvec for empty case properly
1 parent 1c21f0b commit 796a535

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

include/osr/platforms.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@ struct platforms {
182182
rtree_ = rtree_new();
183183

184184
auto i = platform_idx_t{0U};
185+
if (platform_ref_.empty()) {
186+
return;
187+
}
185188
for (auto const refs : platform_ref_) {
186189
for (auto const ref : refs) {
187190
assert(ref != std::numeric_limits<decltype(ref)>::max());

0 commit comments

Comments
 (0)