From 82ca23935a4be0c3fe2452fe290702c616c8eca8 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 18 Dec 2018 10:01:38 +0100 Subject: [PATCH] fixing a crash at updating the widget --- .../simplemobiletools/gallery/pro/helpers/MyWidgetProvider.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MyWidgetProvider.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MyWidgetProvider.kt index 61c892d46..2af024791 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MyWidgetProvider.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MyWidgetProvider.kt @@ -40,9 +40,9 @@ class MyWidgetProvider : AppWidgetProvider() { setText(R.id.widget_folder_name, context.getFolderNameFromPath(it.folderPath)) } - val path = context.directoryDB.getDirectoryThumbnail(it.folderPath) + val path = context.directoryDB.getDirectoryThumbnail(it.folderPath) ?: return@forEach val options = RequestOptions() - .signature(path!!.getFileSignature()) + .signature(path.getFileSignature()) .diskCacheStrategy(DiskCacheStrategy.RESOURCE) if (context.config.cropThumbnails) options.centerCrop() else options.fitCenter()