From a65ffd5f5599c36198749f74e8c663c17065fc7f Mon Sep 17 00:00:00 2001 From: Bnyro Date: Mon, 2 Dec 2024 20:48:24 +0100 Subject: [PATCH] fix: crash when trying to play downloaded video offline --- .../java/com/github/libretube/ui/fragments/PlayerFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/github/libretube/ui/fragments/PlayerFragment.kt b/app/src/main/java/com/github/libretube/ui/fragments/PlayerFragment.kt index 8af5b8fd9..37581bd1a 100644 --- a/app/src/main/java/com/github/libretube/ui/fragments/PlayerFragment.kt +++ b/app/src/main/java/com/github/libretube/ui/fragments/PlayerFragment.kt @@ -1436,7 +1436,7 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions { } private fun shouldStartPiP(): Boolean { - return shouldUsePip() && playerController.isPlaying && + return shouldUsePip() && ::playerController.isInitialized && playerController.isPlaying && !BackgroundHelper.isBackgroundServiceRunning(requireContext()) }