diff options
| author | cvium <clausvium@gmail.com> | 2021-03-03 09:37:21 +0100 |
|---|---|---|
| committer | cvium <clausvium@gmail.com> | 2021-03-03 09:37:21 +0100 |
| commit | a49f5d2a441d53076c0eae27fc115a97691f4856 (patch) | |
| tree | 8d5222f8f0affed11f258e7591087a5564bd8f4d /MediaBrowser.Model/Entities/ProviderIdsExtensions.cs | |
| parent | 664c5da31728e65d0e53ada7c06c918059f73615 (diff) | |
revert removal of null check
Diffstat (limited to 'MediaBrowser.Model/Entities/ProviderIdsExtensions.cs')
| -rw-r--r-- | MediaBrowser.Model/Entities/ProviderIdsExtensions.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs b/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs index 571bc7006..3086fcefd 100644 --- a/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs +++ b/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs @@ -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)) |
