mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-04-29 22:24:29 +02:00
fix null pointer exception
This commit is contained in:
parent
4d3acdb5fb
commit
809b99c9c9
@ -1322,7 +1322,14 @@ class VideoDetailView : ConstraintLayout {
|
||||
this.video = video;
|
||||
cleanupPlaybackTracker();
|
||||
|
||||
onVideoChanged.emit(video.video.videoSources[0].width, video.video.videoSources[0].height)
|
||||
if (video.video.videoSources.isNotEmpty()) {
|
||||
onVideoChanged.emit(
|
||||
video.video.videoSources[0].width,
|
||||
video.video.videoSources[0].height
|
||||
)
|
||||
} else {
|
||||
onVideoChanged.emit(0, 0)
|
||||
}
|
||||
|
||||
if (video is JSVideoDetails) {
|
||||
val me = this;
|
||||
|
Loading…
x
Reference in New Issue
Block a user