check if the activity is still alive after cropping for wallpaper

This commit is contained in:
tibbi 2017-03-06 23:18:47 +01:00
parent 86c2499345
commit d80a0db3cb
1 changed files with 3 additions and 0 deletions

View File

@ -66,6 +66,9 @@ class SetWallpaperActivity : SimpleActivity(), CropImageView.OnCropImageComplete
}
override fun onCropImageComplete(view: CropImageView?, result: CropImageView.CropResult) {
if (isDestroyed)
return
if (result.error == null) {
toast(R.string.setting_wallpaper)
Thread({