diff --git a/map_gui/src/render/map.rs b/map_gui/src/render/map.rs index 3ef94224a9..b00b289639 100644 --- a/map_gui/src/render/map.rs +++ b/map_gui/src/render/map.rs @@ -447,6 +447,12 @@ impl DrawMap { } pub fn create_lane(&mut self, l: LaneID, map: &Map) { + // If we're recreating an existing lane, don't create a duplicate quadtree entry for it! + // quadtree.insert_with_box isn't idempotent. + if let Some(item_id) = self.lane_ids.remove(&l) { + self.quadtree.remove(item_id).unwrap(); + } + let draw = DrawLane::new(map.get_l(l), map); let item_id = self .quadtree