Browse Source

Don't try to create a framebuffer of size 0.

scenegraph-after-breakage
Steven Kirk 9 years ago
parent
commit
cb9e9a196d
  1. 2
      src/Windows/Avalonia.Win32/FramebufferManager.cs

2
src/Windows/Avalonia.Win32/FramebufferManager.cs

@ -25,7 +25,7 @@ namespace Avalonia.Win32
UnmanagedMethods.GetClientRect(_hwnd, out rc);
var width = rc.right - rc.left;
var height = rc.bottom - rc.top;
if (_fb == null || _fb.Width != width || _fb.Height != height)
if ((_fb == null || _fb.Width != width || _fb.Height != height) && width > 0 && height > 0)
{
_fb?.Deallocate();
_fb = null;

Loading…
Cancel
Save