fix: crash when trying to play downloaded video offline

This commit is contained in:
Bnyro 2024-12-02 20:48:24 +01:00
parent 40c885316d
commit a65ffd5f55

View File

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