Skip to content

Commit cdc42d6

Browse files
joshuamegnauth54hecrj
authored andcommitted
Assert dimensions of quads are normal in iced_tiny_skia
1 parent 66c8a80 commit cdc42d6

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

tiny_skia/src/backend.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,15 @@ impl Backend {
155155
border,
156156
shadow,
157157
} => {
158+
debug_assert!(
159+
bounds.width.is_normal(),
160+
"Quad with non-normal width!"
161+
);
162+
debug_assert!(
163+
bounds.height.is_normal(),
164+
"Quad with non-normal height!"
165+
);
166+
158167
let physical_bounds = (*bounds + translation) * scale_factor;
159168

160169
if !clip_bounds.intersects(&physical_bounds) {

0 commit comments

Comments
 (0)