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 cc250c9099..1108b0f4fd 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 @@ -141,11 +141,11 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions { private lateinit var streams: Streams val isShort get() = run { - val heightGreaterThanWidth = streams.videoStreams.firstOrNull()?.let { + val heightGreaterThanWidth = ::streams.isInitialized && streams.videoStreams.first().let { (it.height ?: 0) > (it.width ?: 0) } - PlayingQueue.getCurrent()?.isShort == true || heightGreaterThanWidth == true + PlayingQueue.getCurrent()?.isShort == true || heightGreaterThanWidth } // if null, it's been set to automatic