From 11d8730fab1ebcc6649f39a0ed19d0a000345e80 Mon Sep 17 00:00:00 2001 From: Relwi Date: Sun, 29 Sep 2024 22:38:10 +0200 Subject: [PATCH] fix: shuffle button crash when playlist is empty --- .../java/com/github/libretube/ui/fragments/PlaylistFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/github/libretube/ui/fragments/PlaylistFragment.kt b/app/src/main/java/com/github/libretube/ui/fragments/PlaylistFragment.kt index 2a7f71807..1be67183d 100644 --- a/app/src/main/java/com/github/libretube/ui/fragments/PlaylistFragment.kt +++ b/app/src/main/java/com/github/libretube/ui/fragments/PlaylistFragment.kt @@ -253,7 +253,7 @@ class PlaylistFragment : DynamicLayoutManagerFragment() { PlayingQueue.add(*queue.toTypedArray()) NavigationHelper.navigateVideo( requireContext(), - queue.first().url, + queue.firstOrNull()?.url, playlistId = playlistId, keepQueue = true )