Browse Source

Change Guid.Parse to Guid.TryParse

Mister Rajoy 4 years ago
parent
commit
4cc3b938fa
1 changed files with 3 additions and 1 deletions
  1. 3 1
      Emby.Server.Implementations/Collections/CollectionManager.cs

+ 3 - 1
Emby.Server.Implementations/Collections/CollectionManager.cs

@@ -348,11 +348,13 @@ namespace Emby.Server.Implementations.Collections
                         foreach (var child in item.GetMediaSources(true))
                         {
 
-                            if (results.ContainsKey(Guid.Parse(child.Id)))
+                            if (Guid.TryParse(child.Id, out var id) && results.ContainsKey(id))
                             {
                                 alreadyInResults = true;
+                                break;
                             }
                         }
+
                         if (!alreadyInResults)
                         {