Browse Source

Merge pull request #6069 from DrunkyBard/remote-widget-fix-zero-size

fixes RemoteWidget error when width or height is equal to zero. Issue…
pull/6077/head
Nikita Tsukanov 5 years ago
committed by GitHub
parent
commit
8587e73c39
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  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