Merge pull request #142 from yausername/serviceByUrlNPEfix

fix npe in fetching service by url
This commit is contained in:
Christian Schabesberger 2019-03-01 09:57:52 +01:00 committed by GitHub
commit 536365c99e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -308,11 +308,11 @@ public abstract class StreamingService {
LinkHandlerFactory cH = getChannelLHFactory(); LinkHandlerFactory cH = getChannelLHFactory();
LinkHandlerFactory pH = getPlaylistLHFactory(); LinkHandlerFactory pH = getPlaylistLHFactory();
if (sH.acceptUrl(url)) { if (sH != null && sH.acceptUrl(url)) {
return LinkType.STREAM; return LinkType.STREAM;
} else if (cH.acceptUrl(url)) { } else if (cH != null && cH.acceptUrl(url)) {
return LinkType.CHANNEL; return LinkType.CHANNEL;
} else if (pH.acceptUrl(url)) { } else if (pH != null && pH.acceptUrl(url)) {
return LinkType.PLAYLIST; return LinkType.PLAYLIST;
} else { } else {
return LinkType.NONE; return LinkType.NONE;