Skip to content
Snippets Groups Projects
Unverified Commit cc63624d authored by Sam Yates's avatar Sam Yates Committed by GitHub
Browse files

Check for empty region in ls::uniform. (#1530)

Fixes issue #1529.
parent 0a7c062e
No related branches found
No related tags found
No related merge requests found
...@@ -417,6 +417,9 @@ mlocation_list thingify_(const uniform_& u, const mprovider& p) { ...@@ -417,6 +417,9 @@ mlocation_list thingify_(const uniform_& u, const mprovider& p) {
mextent reg_extent = thingify(u.reg, p); mextent reg_extent = thingify(u.reg, p);
const mcable_list& reg_cables = reg_extent.cables(); const mcable_list& reg_cables = reg_extent.cables();
// Only proceed if the region is non-empty.
if (reg_cables.empty()) return {};
std::vector<double> lengths_bounds; std::vector<double> lengths_bounds;
auto lengths_part = util::make_partition(lengths_bounds, auto lengths_part = util::make_partition(lengths_bounds,
util::transform_view(reg_cables, [&embed](const auto& c) { util::transform_view(reg_cables, [&embed](const auto& c) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment