diff --git a/arbor/morph/locset.cpp b/arbor/morph/locset.cpp index 2fc140e5ea223187e9656fb60b9b2f1b38e9e753..2e89ec2c9faacb255ef1449cceefa0a11da5df35 100644 --- a/arbor/morph/locset.cpp +++ b/arbor/morph/locset.cpp @@ -417,6 +417,9 @@ mlocation_list thingify_(const uniform_& u, const mprovider& p) { mextent reg_extent = thingify(u.reg, p); 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; auto lengths_part = util::make_partition(lengths_bounds, util::transform_view(reg_cables, [&embed](const auto& c) {