diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java index 41535c40d9..bd1bbd253a 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java @@ -1058,7 +1058,16 @@ public List getFrames() throws ExtractionException { storyboardsRenderer = storyboards.getObject("playerStoryboardSpecRenderer"); } - final String[] spec = storyboardsRenderer.getString("spec").split("\\|"); + if (storyboardsRenderer == null) { + return new ArrayList<>(); + } + + final String storyboardsRendererSpec = storyboardsRenderer.getString("spec"); + if (storyboardsRendererSpec == null) { + return new ArrayList<>(); + } + + final String[] spec = storyboardsRendererSpec.split("\\|"); final String url = spec[0]; final ArrayList result = new ArrayList<>(spec.length - 1);