diff --git a/Audio/PluginController.mm b/Audio/PluginController.mm index 71a5b4e7e..7d35c5ecc 100644 --- a/Audio/PluginController.mm +++ b/Audio/PluginController.mm @@ -49,6 +49,8 @@ static void cache_deinit() { } static void cache_insert_properties(NSURL *url, NSDictionary *properties) { + if(properties == nil) return; + std::lock_guard lock(Cache_Lock); std::string path = [[url absoluteString] UTF8String]; @@ -61,6 +63,8 @@ static void cache_insert_properties(NSURL *url, NSDictionary *properties) { } static void cache_insert_metadata(NSURL *url, NSDictionary *metadata) { + if(metadata == nil) return; + std::lock_guard lock(Cache_Lock); std::string path = [[url absoluteString] UTF8String]; diff --git a/Utils/RedundantPlaylistDataStore.m b/Utils/RedundantPlaylistDataStore.m index 19c00d82e..904ba6264 100644 --- a/Utils/RedundantPlaylistDataStore.m +++ b/Utils/RedundantPlaylistDataStore.m @@ -52,6 +52,8 @@ } - (NSDictionary *)coalesceEntryInfo:(NSDictionary *)entryInfo { + if(entryInfo == nil) return entryInfo; + __block NSMutableDictionary *ret = [[NSMutableDictionary alloc] initWithCapacity:[entryInfo count]]; [entryInfo enumerateKeysAndObjectsUsingBlock:^(id _Nonnull key, id _Nonnull obj, BOOL *_Nonnull stop) {