diff --git a/CHANGELOG.md b/CHANGELOG.md index 6decc4cb..98a7865b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - An instance test to make sure thumbnails are reachable +### Fixed + +- A rare error when video player is closed but does not have valid content + ## [0.17.0] - 2023-11-17 ### Added diff --git a/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs b/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs index 7e66cedc..fc124dc4 100644 --- a/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs +++ b/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs @@ -188,12 +188,14 @@ function OnVideoPlayerStateChange() as void if content = invalid m.container@.watchedVideosClear(invalid) VideoUtils.CloseVideo() + return end if metadata = content.metadata if metadata = invalid m.container@.watchedVideosClear(invalid) VideoUtils.CloseVideo() + return end if if not PlayNext(metadata.recommendedVideos)