fix: mobile cursor, check null (#8481)
Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
parent
faf363cfd2
commit
f17e17a6b9
@ -938,9 +938,13 @@ class CursorPaint extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final image = m.image ?? preDefaultCursor.image;
|
final image = m.image ?? preDefaultCursor.image;
|
||||||
|
if (image == null) {
|
||||||
|
return Offstage();
|
||||||
|
}
|
||||||
|
|
||||||
final minSize = 24.0;
|
final minSize = 24.0;
|
||||||
double mins =
|
double mins =
|
||||||
minSize / (image!.width > image.height ? image.width : image.height);
|
minSize / (image.width > image.height ? image.width : image.height);
|
||||||
double factor = 1.0;
|
double factor = 1.0;
|
||||||
if (s < mins) {
|
if (s < mins) {
|
||||||
factor = s / mins;
|
factor = s / mins;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user