Browse Source

add fix for null reference exception when arranging.

added comments explaining the conditions that the bug occurs in.
pull/1059/head
Dan Walmsley 9 years ago
parent
commit
fa1f5bc8f9
  1. 4
      src/Avalonia.Layout/LayoutManager.cs

4
src/Avalonia.Layout/LayoutManager.cs

@ -190,8 +190,10 @@ namespace Avalonia.Layout
{
root.Arrange(new Rect(control.DesiredSize));
}
else
else if(control.PreviousArrange != null)
{
// Has been observed that PreviousArrange sometimes is null, probably a bug somewhere else.
// Condition observed: control.VisualParent is Scrollbar, control is Border.
control.Arrange(control.PreviousArrange.Value);
}
}

Loading…
Cancel
Save