Skip to content

Commit

Permalink
Add hack to prevent renderer crashing on 0x0 window x11.
Browse files Browse the repository at this point in the history
  • Loading branch information
danwalmsley committed Jan 20, 2020
1 parent 1f1d3a8 commit 32df775
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Avalonia.X11/X11Framebuffer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ class X11Framebuffer : ILockedFramebuffer

public X11Framebuffer(IntPtr display, IntPtr xid, int depth, int width, int height, double factor)
{
// HACK! Please fix renderer, should never ask for 0x0 bitmap.
width = Math.Max(1, width);
height = Math.Max(1, height);

_display = display;
_xid = xid;
_depth = depth;
Expand Down

0 comments on commit 32df775

Please sign in to comment.