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 aea578df8..e8fd389dc 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 @@ -688,9 +688,11 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions { @SuppressLint("SourceLockedOrientationActivity") fun unsetFullscreen() { + if (activity == null || _binding == null) return + viewModel.isFullscreen.value = false - if (!PlayerHelper.autoFullscreenEnabled && activity != null) { + if (!PlayerHelper.autoFullscreenEnabled) { mainActivity.requestedOrientation = mainActivity.screenOrientationPref }