From f17e17a6b992edfd02a3ea3d9689df257eeff3ab Mon Sep 17 00:00:00 2001 From: fufesou <13586388+fufesou@users.noreply.github.com> Date: Wed, 26 Jun 2024 19:49:52 +0800 Subject: [PATCH] fix: mobile cursor, check null (#8481) Signed-off-by: fufesou --- flutter/lib/mobile/pages/remote_page.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/flutter/lib/mobile/pages/remote_page.dart b/flutter/lib/mobile/pages/remote_page.dart index f86d35a1c..819ba6c96 100644 --- a/flutter/lib/mobile/pages/remote_page.dart +++ b/flutter/lib/mobile/pages/remote_page.dart @@ -938,9 +938,13 @@ class CursorPaint extends StatelessWidget { } final image = m.image ?? preDefaultCursor.image; + if (image == null) { + return Offstage(); + } + final minSize = 24.0; double mins = - minSize / (image!.width > image.height ? image.width : image.height); + minSize / (image.width > image.height ? image.width : image.height); double factor = 1.0; if (s < mins) { factor = s / mins;