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()) }