mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-11 13:10:54 +00:00
Don't panic when allocating tiny_skia pixmap
This commit is contained in:
parent
031472dc5a
commit
4b55b578b2
1 changed files with 1 additions and 1 deletions
|
@ -143,7 +143,7 @@ impl SpriteCache {
|
|||
}) {
|
||||
Entry::Occupied(entry) => Some(entry.get().clone()),
|
||||
Entry::Vacant(entry) => {
|
||||
let mut pixmap = tiny_skia::Pixmap::new(size.x() as u32, size.y() as u32).unwrap();
|
||||
let mut pixmap = tiny_skia::Pixmap::new(size.x() as u32, size.y() as u32)?;
|
||||
resvg::render(&svg, usvg::FitTo::Width(size.x() as u32), pixmap.as_mut());
|
||||
let mask = pixmap
|
||||
.pixels()
|
||||
|
|
Loading…
Reference in a new issue