mirror of
https://github.com/typst/typst
synced 2025-06-09 13:46:24 +08:00
Fix panic
This commit is contained in:
parent
01fd27c747
commit
24087db62f
@ -344,9 +344,9 @@ pub fn handle_shape(
|
||||
path_builder.line_to(l.x.to_f32(), l.y.to_f32());
|
||||
}
|
||||
Geometry::Rect(r) => {
|
||||
path_builder.push_rect(
|
||||
Rect::from_xywh(0.0, 0.0, r.x.to_f32(), r.y.to_f32()).unwrap(),
|
||||
);
|
||||
if let Some(r) = Rect::from_xywh(0.0, 0.0, r.x.to_f32(), r.y.to_f32()) {
|
||||
path_builder.push_rect(r);
|
||||
}
|
||||
}
|
||||
Geometry::Path(p) => {
|
||||
convert_path(p, &mut path_builder);
|
||||
|
Loading…
x
Reference in New Issue
Block a user