diff --git a/app/src/main/java/com/github/libretube/ui/adapters/PlaylistsAdapter.kt b/app/src/main/java/com/github/libretube/ui/adapters/PlaylistsAdapter.kt index 2a650a922f..ca7cccc9cc 100644 --- a/app/src/main/java/com/github/libretube/ui/adapters/PlaylistsAdapter.kt +++ b/app/src/main/java/com/github/libretube/ui/adapters/PlaylistsAdapter.kt @@ -39,7 +39,7 @@ class PlaylistsAdapter( val playlist = playlists[position] holder.binding.apply { // set imageview drawable as empty playlist if imageview empty - if (playlist.thumbnail!!.split("/").size <= 4) { + if (playlist.thumbnail.orEmpty().split("/").size <= 4) { playlistThumbnail.setImageResource(R.drawable.ic_empty_playlist) playlistThumbnail.setBackgroundColor(R.attr.colorSurface) } else {