This commit is contained in:
tarsin committed 2022-12-01 09:25:55 +08:00
1 parent 1bf676fd56
commit be552e92a1
1 file changed
+4 -3
+4 -3
View File
@@ -128,12 +128,13 @@ class Image private constructor(
fun texImage(init: Boolean, offsetX: Int, offsetY: Int, width: Int, height: Int) {
check(!hardware) { "Hardware buffer cannot be used in glgallery" }
val bitmap: Bitmap = if (animated) {
val bitmap: Bitmap? = if (animated) {
updateBitmap()
mBitmap!!
mBitmap
} else {
(mObtainedDrawable as BitmapDrawable).bitmap
(mObtainedDrawable as BitmapDrawable?)?.bitmap
}
bitmap ?: return
nativeTexImage(
bitmap,
init,