From cb9e9a196d7a66df226632efda7a97b509e1b17b Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Fri, 30 Jun 2017 23:55:12 +0200 Subject: [PATCH] Don't try to create a framebuffer of size 0. --- src/Windows/Avalonia.Win32/FramebufferManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Windows/Avalonia.Win32/FramebufferManager.cs b/src/Windows/Avalonia.Win32/FramebufferManager.cs index f0a6430918..bdc6fb29fd 100644 --- a/src/Windows/Avalonia.Win32/FramebufferManager.cs +++ b/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;