Skip to content

Commit

Permalink
Merge pull request #6069 from DrunkyBard/remote-widget-fix-zero-size
Browse files Browse the repository at this point in the history
fixes RemoteWidget error when width or height is equal to zero. Issue…
  • Loading branch information
kekekeks committed Jun 15, 2021
2 parents 151a7a0 + 6aba61f commit 8587e73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Avalonia.Controls/Remote/RemoteWidget.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 ||
Expand Down

0 comments on commit 8587e73

Please sign in to comment.