Skip to content

Commit

Permalink
Update layers.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
rustbasic authored Sep 17, 2024
1 parent 6ae700e commit 1625732
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crates/egui/src/layers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ impl PaintList {
#[inline(always)]
pub fn set(&mut self, idx: ShapeIdx, clip_rect: Rect, shape: Shape) {
if self.0.len() <= idx.0 {
#[cfg(feature = "log")]
log::warn!("Index {} is out of bounds for PaintList", idx.0);
self.add(clip_rect, Shape::Noop);
}
Expand Down

0 comments on commit 1625732

Please sign in to comment.