diff --git a/subsonic-main/src/main/java/net/sourceforge/subsonic/controller/RESTController.java b/subsonic-main/src/main/java/net/sourceforge/subsonic/controller/RESTController.java index 1c9075a5b..aa342dc40 100644 --- a/subsonic-main/src/main/java/net/sourceforge/subsonic/controller/RESTController.java +++ b/subsonic-main/src/main/java/net/sourceforge/subsonic/controller/RESTController.java @@ -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())); }