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

View file

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