do not try updating contact photo if the given activity is destroyed

This commit is contained in:
tibbi 2018-11-19 16:53:45 +01:00
parent 0a14414ba0
commit e3b0caa577
1 changed files with 4 additions and 0 deletions

View File

@ -45,6 +45,10 @@ abstract class ContactActivity : SimpleActivity() {
.diskCacheStrategy(DiskCacheStrategy.RESOURCE) .diskCacheStrategy(DiskCacheStrategy.RESOURCE)
.centerCrop() .centerCrop()
if (isDestroyed) {
return
}
Glide.with(this) Glide.with(this)
.load(bitmap ?: path) .load(bitmap ?: path)
.transition(DrawableTransitionOptions.withCrossFade()) .transition(DrawableTransitionOptions.withCrossFade())