Skip to content

Commit dfc8f4d

Browse files
authored
Fix crash setting zero or negative values in Border size (dotnet#7665)
1 parent e32980a commit dfc8f4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Core/src/Platform/Windows/ContentPanel.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ internal FrameworkElement? Content
5959

6060
_borderPath?.Arrange(new global::Windows.Foundation.Rect(0, 0, finalSize.Width, finalSize.Height));
6161

62-
return new global::Windows.Foundation.Size(actual.Width, actual.Height);
62+
return new global::Windows.Foundation.Size(Math.Max(0, actual.Width), Math.Max(0, actual.Height));
6363
}
6464

6565
public ContentPanel()

0 commit comments

Comments
 (0)