Browse Source

Fix SetImage to avoid out of range exception (#1798)

* Fix SetImage to avoid out of range exception

* Actually use the new images we've retrieved
Anthony Lavado 5 years ago
parent
commit
bae5e3795e
1 changed files with 2 additions and 2 deletions
  1. 2 2
      MediaBrowser.Controller/Entities/BaseItem.cs

+ 2 - 2
MediaBrowser.Controller/Entities/BaseItem.cs

@@ -2238,8 +2238,8 @@ namespace MediaBrowser.Controller.Entities
                 var currentCount = current.Length;
                 var currentCount = current.Length;
                 var newArr = new ItemImageInfo[currentCount + 1];
                 var newArr = new ItemImageInfo[currentCount + 1];
                 current.CopyTo(newArr, 0);
                 current.CopyTo(newArr, 0);
-                current[currentCount] = image;
-                ImageInfos = current;
+                newArr[currentCount] = image;
+                ImageInfos = newArr;
             }
             }
         }
         }