From be2316163e0160baf3eb07e29165c43db1a84060 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Sun, 23 Sep 2018 16:44:44 -0700 Subject: [PATCH] Add a safety check for attempting to add unsupported URLs. --- Playlist/PlaylistLoader.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Playlist/PlaylistLoader.m b/Playlist/PlaylistLoader.m index e3630d252..98c56abef 100755 --- a/Playlist/PlaylistLoader.m +++ b/Playlist/PlaylistLoader.m @@ -393,6 +393,10 @@ NSMutableDictionary * dictionaryWithPropertiesOfObject(id obj, NSArray * filterL int count = (int) [validURLs count]; if (xmlData) count += [[xmlData objectForKey:@"entries"] count]; + // no valid URLs, or they use an unsupported URL scheme + if (!count) + return [NSArray array]; + int i = 0; NSMutableArray *entries = [NSMutableArray arrayWithCapacity:count]; for (NSURL *url in validURLs)