Skip to content

Commit 1294373

Browse files
committed
avoid BitmapFactory.decode crash, such as OOM.
1 parent 15d6c09 commit 1294373

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

library/src/main/java/com/opensource/svgaplayer/SVGAVideoEntity.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ class SVGAVideoEntity {
5353
FPS = movieParams.fps ?: 20
5454
frames = movieParams.frames ?: 0
5555
}
56-
resetImages(obj)
56+
try {
57+
resetImages(obj)
58+
} catch (e: Exception) {
59+
e.printStackTrace()
60+
}
5761
resetSprites(obj)
5862
}
5963

0 commit comments

Comments
 (0)