add some activity checks at clearing Glide load

This commit is contained in:
tibbi 2017-07-02 08:52:31 +02:00
parent 693e93aa6c
commit 2acbc1a02e
2 changed files with 4 additions and 2 deletions

View file

@ -455,7 +455,8 @@ class DirectoryAdapter(val activity: SimpleActivity, var dirs: MutableList<Direc
}
fun stopLoad() {
Glide.with(activity).clear(view.dir_thumbnail)
if (!activity.isDestroyed)
Glide.with(activity).clear(view.dir_thumbnail)
}
}

View file

@ -370,7 +370,8 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
}
fun stopLoad() {
Glide.with(activity).clear(view.medium_thumbnail)
if (!activity.isDestroyed)
Glide.with(activity).clear(view.medium_thumbnail)
}
}