From b0972c86429d01a5d32ac207cf89208d269274bf Mon Sep 17 00:00:00 2001 From: Sattar Imamov Date: Tue, 15 Jun 2021 00:12:03 +0200 Subject: [PATCH] fixes RemoteWidget error when width or height is equal to zero. Issue #6068 --- src/Avalonia.Controls/Remote/RemoteWidget.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Avalonia.Controls/Remote/RemoteWidget.cs b/src/Avalonia.Controls/Remote/RemoteWidget.cs index fabb38f87d5..234960e87c5 100644 --- a/src/Avalonia.Controls/Remote/RemoteWidget.cs +++ b/src/Avalonia.Controls/Remote/RemoteWidget.cs @@ -70,7 +70,7 @@ protected override void ArrangeCore(Rect finalRect) public override void Render(DrawingContext context) { - if (_lastFrame != null) + if (_lastFrame != null && _lastFrame.Width != 0 && _lastFrame.Height != 0) { var fmt = (PixelFormat) _lastFrame.Format; if (_bitmap == null || _bitmap.PixelSize.Width != _lastFrame.Width ||