Browse Source

check either bound of the image.

pull/3902/head
Dan Walmsley 6 years ago
parent
commit
811c7c6d65
  1. 2
      src/Avalonia.Controls/Image.cs

2
src/Avalonia.Controls/Image.cs

@ -69,7 +69,7 @@ namespace Avalonia.Controls
{
var source = Source;
if (source != null && Bounds.Size != Size.Empty)
if (source != null && Bounds.Width > 0 && Bounds.Height > 0)
{
Rect viewPort = new Rect(Bounds.Size);
Size sourceSize = source.Size;

Loading…
Cancel
Save