revert removal of null check

This commit is contained in:
cvium
2021-03-03 09:37:21 +01:00
parent 664c5da317
commit a49f5d2a44
2 changed files with 11 additions and 5 deletions

View File

@@ -50,6 +50,12 @@ namespace MediaBrowser.Model.Entities
throw new ArgumentNullException(nameof(instance));
}
if (instance.ProviderIds == null)
{
id = null;
return false;
}
var foundProviderId = instance.ProviderIds.TryGetValue(name, out id);
// This occurs when searching with Identify (and possibly in other places)
if (string.IsNullOrEmpty(id))