[Android] Crash fix

Nicolas Pomepuy git at videolan.org
Tue Aug 13 10:17:05 CEST 2019


vlc-android | branch: master | Nicolas Pomepuy <nicolas.pomepuy at gmail.com> | Fri Aug  9 13:26:37 2019 +0200| [a21a0889cc6a77573cd2c502d77c8ead6ce38746] | committer: Nicolas Pomepuy

Crash fix

> https://code.videolan.org/videolan/vlc-android/commit/a21a0889cc6a77573cd2c502d77c8ead6ce38746
---

 vlc-android/src/org/videolan/vlc/util/ThumbnailsProvider.kt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/util/ThumbnailsProvider.kt b/vlc-android/src/org/videolan/vlc/util/ThumbnailsProvider.kt
index 922279b2a..74ef23602 100644
--- a/vlc-android/src/org/videolan/vlc/util/ThumbnailsProvider.kt
+++ b/vlc-android/src/org/videolan/vlc/util/ThumbnailsProvider.kt
@@ -42,7 +42,7 @@ object ThumbnailsProvider {
 
     @WorkerThread
     fun getFolderThumbnail(folder: AbstractFolder, width: Int): Bitmap? {
-        val media = listOf(*folder.media(AbstractFolder.TYPE_FOLDER_VIDEO, AbstractMedialibrary.SORT_DEFAULT, true, 4, 0))
+        val media = folder.media(AbstractFolder.TYPE_FOLDER_VIDEO, AbstractMedialibrary.SORT_DEFAULT, true, 4, 0).filterNotNull()
         return getComposedImage("folder:" + folder.title, media, width)
     }
 



More information about the Android mailing list