Skip to content

Commit a080474

Browse files
committed
crash fix - fallback to natural size
1 parent 7665309 commit a080474

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/net/image_cache.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ impl ImageCache for ImageCacheImpl {
735735
let requested_size = {
736736
let width = size.width.try_into().unwrap_or(0);
737737
let height = size.height.try_into().unwrap_or(0);
738-
tiny_skia::IntSize::from_wh(width, height).unwrap()
738+
tiny_skia::IntSize::from_wh(width, height).unwrap_or(natural_size)
739739
};
740740
let transform = tiny_skia::Transform::from_scale(
741741
requested_size.width() as f32 / natural_size.width() as f32,

0 commit comments

Comments
 (0)