Skip to content

Commit

Permalink
Don't crash when rendering markings. #265
Browse files Browse the repository at this point in the history
  • Loading branch information
dabreegster committed Apr 17, 2024
1 parent 0eb39b8 commit 7684047
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions osm2streets/src/render/intersection_markings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ fn make_sidewalk_corners(streets: &StreetNetwork, intersection: &Intersection) -
streets.roads_per_intersection(intersection.id),
intersection.id,
);
if edges.is_empty() {
error!("Intersection {:?} has no edges", intersection.osm_ids);
return Vec::new();
}
edges.push(edges[0].clone());
let mut results = Vec::new();
for pair in edges.windows(2) {
Expand Down

0 comments on commit 7684047

Please sign in to comment.