From 5f94ecf1a0667ad51b828cbfa7adb940dde860bd Mon Sep 17 00:00:00 2001 From: krille-chan Date: Sun, 19 Nov 2023 09:40:26 +0100 Subject: [PATCH] fix: Blurhash crashes on height 0 --- lib/pages/chat/events/image_bubble.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/pages/chat/events/image_bubble.dart b/lib/pages/chat/events/image_bubble.dart index ab5fb03c..ae8e7a83 100644 --- a/lib/pages/chat/events/image_bubble.dart +++ b/lib/pages/chat/events/image_bubble.dart @@ -52,8 +52,10 @@ class ImageBubble extends StatelessWidget { var height = 32; if (ratio > 1.0) { height = (width / ratio).round(); + if (height <= 0) height = 1; } else { width = (height * ratio).round(); + if (width <= 0) width = 1; } return SizedBox( width: this.width,