Browse Source

fixes RemoteWidget error when width or height is equal to zero. Issue #6068

pull/6069/head
Sattar Imamov 5 years ago
parent
commit
b0972c8642
  1. 2
      src/Avalonia.Controls/Remote/RemoteWidget.cs

2
src/Avalonia.Controls/Remote/RemoteWidget.cs

@ -70,7 +70,7 @@ namespace Avalonia.Controls.Remote
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 ||

Loading…
Cancel
Save