Skip to content

Conversation

@FineFindus
Copy link
Collaborator

Fixes a crash when trying to rotate the player before it is initialized, most likely introduced in 76d7c62.

val isShort
get() = run {
val heightGreaterThanWidth = streams.videoStreams.firstOrNull()?.let {
val heightGreaterThanWidth = ::streams.isInitialized && streams.videoStreams.first().let {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

videoStreams can in fact be empty for some live streams, hence changing it to first() would cause yet another crash.

Fixes a crash when trying to rotate the player before it is
initialized.
@Bnyro Bnyro merged commit a516238 into libre-tube:master Nov 20, 2024
3 checks passed
@FineFindus FineFindus deleted the fix/rotate-crash branch November 20, 2024 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants