3
0
Fork 0
forked from suyu/suyu

android: Fix crash when decodeGameIcon creates a null Bitmap

This commit is contained in:
Charles Lombardo 2023-03-21 17:06:13 -04:00 committed by bunnei
parent 72679c7bae
commit 72bef4fa95

View file

@ -191,7 +191,7 @@ class GameAdapter(private val activity: AppCompatActivity) : RecyclerView.Adapte
}
}
private fun decodeGameIcon(uri: String): Bitmap {
private fun decodeGameIcon(uri: String): Bitmap? {
val data = NativeLibrary.GetIcon(uri)
return BitmapFactory.decodeByteArray(
data,