Avoid rasterizing SVG when a dimension is 0
This commit is contained in:
parent
2ec0a43c4a
commit
d78ae3c852
1 changed files with 4 additions and 0 deletions
|
|
@ -91,6 +91,10 @@ impl Cache {
|
|||
|
||||
match self.load(handle) {
|
||||
Svg::Loaded { tree } => {
|
||||
if width == 0 || height == 0 {
|
||||
return None;
|
||||
}
|
||||
|
||||
let extent = wgpu::Extent3d {
|
||||
width,
|
||||
height,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue