From c5f3debc52e59673f5ea9b219ebd49aecfecebee Mon Sep 17 00:00:00 2001 From: dularion Date: Fri, 28 Sep 2018 21:53:30 +0200 Subject: [PATCH] make suggestNextVideo().getSimpleInstance() nullsafe in PlayerMarshallerService.groovy --- .../streama/marshallers/PlayerMarshallerService.groovy | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/grails-app/services/streama/marshallers/PlayerMarshallerService.groovy b/grails-app/services/streama/marshallers/PlayerMarshallerService.groovy index 420f73b7a..c3c61803e 100644 --- a/grails-app/services/streama/marshallers/PlayerMarshallerService.groovy +++ b/grails-app/services/streama/marshallers/PlayerMarshallerService.groovy @@ -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) { @@ -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) {