Skip to content

Commit

Permalink
Fix NPE with null MediaFile for PodcastEpisode
Browse files Browse the repository at this point in the history
  • Loading branch information
daneren2005 committed Jul 20, 2016
1 parent 14cdaa7 commit d6b93a7
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1685,6 +1685,10 @@ private org.subsonic.restapi.PodcastEpisode createJaxbPodcastEpisode(Player play
String path = episode.getPath();
if (path != null) {
MediaFile mediaFile = mediaFileService.getMediaFile(path);
if(mediaFile == null) {
LOG.warn("File for PodcastEpisode not found or not readable: " + path);
return null;
}
e = createJaxbChild(new org.subsonic.restapi.PodcastEpisode(), player, mediaFile, username);
e.setStreamId(String.valueOf(mediaFile.getId()));
}
Expand Down

0 comments on commit d6b93a7

Please sign in to comment.