diff options
Diffstat (limited to 'wgpu/src/image')
-rw-r--r-- | wgpu/src/image/vector.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/wgpu/src/image/vector.rs b/wgpu/src/image/vector.rs index aa712372..713978f5 100644 --- a/wgpu/src/image/vector.rs +++ b/wgpu/src/image/vector.rs @@ -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, |