Skip to content

Commit 81f3865

Browse files
committed
Fix: Crash on loading error img
1 parent 724d2eb commit 81f3865

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

FCLLibrary/src/main/java/com/mio/util/ImageUtil.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class ImageUtil {
2626
if (!File(path).exists() or (getBitmapMemorySize(path) > 104857600)) {
2727
return Optional.empty<Bitmap>()
2828
}
29-
return Optional.of(BitmapFactory.decodeFile(path))
29+
return Optional.ofNullable(BitmapFactory.decodeFile(path))
3030
}
3131
}
3232
}

0 commit comments

Comments
 (0)