fix crash when return null as a related streams collector

This commit is contained in:
Christian Schabesberger 2018-12-23 20:25:19 +01:00
parent 2148edc7d7
commit 7fcb3f5790
2 changed files with 2 additions and 1 deletions

View File

@ -188,7 +188,7 @@ public class MediaCCCStreamExtractor extends StreamExtractor {
@Override
public StreamInfoItemsCollector getRelatedStreams() throws IOException, ExtractionException {
return null;
return new StreamInfoItemsCollector(getServiceId());
}
@Override

View File

@ -30,6 +30,7 @@ public class ExtractorHelper {
public static List<InfoItem> getRelatedVideosOrLogError(StreamInfo info, StreamExtractor extractor) {
try {
InfoItemsCollector<? extends InfoItem, ?> collector = extractor.getRelatedStreams();
if(collector == null) return Collections.emptyList();
info.addAllErrors(collector.getErrors());
//noinspection unchecked