Skip to content

Commit

Permalink
make suggestNextVideo().getSimpleInstance() nullsafe in PlayerMarshal…
Browse files Browse the repository at this point in the history
…lerService.groovy
  • Loading branch information
dularion committed Sep 28, 2018
1 parent 397d81f commit c5f3deb
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ class PlayerMarshallerService {

Video nextEpisode = video.getNextEpisode()
if (nextEpisode && nextEpisode.files) {
returnArray['nextEpisode'] = nextEpisode.getSimpleInstance()
returnArray['nextEpisode'] = nextEpisode?.getSimpleInstance()
}else{
returnArray['nextVideo'] = video.suggestNextVideo().getSimpleInstance()
returnArray['nextVideo'] = video.suggestNextVideo()?.getSimpleInstance()
}
}
if (video instanceof Movie) {
Expand All @@ -64,7 +64,7 @@ class PlayerMarshallerService {
returnArray['backdrop_path'] = video.buildImagePath('backdrop_path', 1280)
returnArray['poster_path'] = video.poster_path
returnArray['trailerKey'] = video.trailerKey
returnArray['nextVideo'] = video.suggestNextVideo().getSimpleInstance()
returnArray['nextVideo'] = video.suggestNextVideo()?.getSimpleInstance()

}
if (video instanceof GenericVideo) {
Expand Down

0 comments on commit c5f3deb

Please sign in to comment.