Fix crash

This commit is contained in:
Jay 2020-05-03 01:40:54 -04:00
parent 23230ddeb7
commit 1d4bf3ec34

View file

@ -1,5 +1,6 @@
package eu.kanade.tachiyomi.ui.source.browse
import android.app.Activity
import android.view.View
import androidx.recyclerview.widget.RecyclerView
import com.bumptech.glide.Glide
@ -56,6 +57,7 @@ class BrowseSourceGridHolder(
}
override fun setImage(manga: Manga) {
if ((view.context as? Activity)?.isDestroyed == true) return
if (manga.thumbnail_url == null)
Glide.with(view.context).clear(cover_thumbnail)
else {