diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/EditActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/EditActivity.kt index bde21bca8..aa4d554a6 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/EditActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/EditActivity.kt @@ -583,7 +583,14 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener val thumbnailSize = resources.getDimension(R.dimen.bottom_filters_thumbnail_size).toInt() val bitmap = Glide.with(this) .asBitmap() - .load(uri) + .load(uri).listener(object : RequestListener { + override fun onLoadFailed(e: GlideException?, model: Any?, target: Target?, isFirstResource: Boolean): Boolean { + showErrorToast(e.toString()) + return false + } + + override fun onResourceReady(resource: Bitmap?, model: Any?, target: Target?, dataSource: DataSource?, isFirstResource: Boolean) = false + }) .submit(thumbnailSize, thumbnailSize) .get()