Fix NPE when evicting cache but Image was recycled
But why was it recycled?
This commit is contained in:
1 parent
f0021a7601
commit
b6f5d72db5
1 file changed
+1
-2
@@ -56,8 +56,7 @@ class Image private constructor(drawable: Drawable, private val src: AutoCloseab
|
||||
var mObtainedDrawable: Drawable? = drawable
|
||||
private set
|
||||
|
||||
val size: Int
|
||||
get() = mObtainedDrawable!!.run { intrinsicHeight * intrinsicWidth * 4 * if (this is Animatable) 4 else 1 }
|
||||
val size = drawable.run { intrinsicHeight * intrinsicWidth * 4 * if (this is Animatable) 4 else 1 }
|
||||
|
||||
@Synchronized
|
||||
fun recycle() {
|
||||
|
||||
Reference in new issue
Block a user