Explorar el Código

Prevent out-of-bounds in DirtyRects.Coalesce.

Steven Kirk hace 9 años
padre
commit
64287fe148
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/Avalonia.Visuals/Rendering/DirtyRects.cs

+ 1 - 1
src/Avalonia.Visuals/Rendering/DirtyRects.cs

@@ -42,7 +42,7 @@ namespace Avalonia.Rendering
                 {
                     var b = _rects[j];
 
-                    if (a.Intersects(b))
+                    if (i < _rects.Count && a.Intersects(b))
                     {
                         _rects[i] = _rects[i].Union(b);
                         _rects.RemoveAt(i);