Skip to content
Snippets Groups Projects
Commit 8d639cbe authored by Nicolas Pomepuy's avatar Nicolas Pomepuy Committed by Duncan McNamara
Browse files

Fix media thumbnail deletion crash

Fixes #2989
parent ed2d049f
No related branches found
No related tags found
Loading
Pipeline #381288 passed with stage
in 17 minutes and 49 seconds
......@@ -129,8 +129,7 @@ class CallBackDelegate : ICallBackHandler,
AppContextProvider.appContext.getExternalFilesDir(null)?.let {
val file = File(it.absolutePath + Medialibrary.MEDIALIB_FOLDER_NAME + "/$mediaId.jpg")
if (file.exists()) {
val media = medialibrary.getMedia(mediaId)
media.removeThumbnail()
medialibrary.getMedia(mediaId)?.removeThumbnail()
}
FileUtils.deleteFile(file)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment