浏览代码

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 年之前
父节点
当前提交
bae5e3795e
共有 1 个文件被更改,包括 2 次插入2 次删除
  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 newArr = new ItemImageInfo[currentCount + 1];
                 current.CopyTo(newArr, 0);
-                current[currentCount] = image;
-                ImageInfos = current;
+                newArr[currentCount] = image;
+                ImageInfos = newArr;
             }
         }