From e554b1e3c1e8a14165c83f8833e5390f760d9a3f Mon Sep 17 00:00:00 2001
From: faiface <faiface@ksp.sk>
Date: Wed, 8 Nov 2017 22:28:32 +0100
Subject: [PATCH] dirty fix #58 (panic on minimizing windows)

---
 pixelgl/glframe.go | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/pixelgl/glframe.go b/pixelgl/glframe.go
index ab35725..a6ef881 100644
--- a/pixelgl/glframe.go
+++ b/pixelgl/glframe.go
@@ -32,6 +32,12 @@ func (gf *GLFrame) SetBounds(bounds pixel.Rect) {
 		oldF := gf.frame
 
 		_, _, w, h := intBounds(bounds)
+		if w <= 0 {
+			w = 1
+		}
+		if h <= 0 {
+			h = 1
+		}
 		gf.frame = glhf.NewFrame(w, h, false)
 
 		// preserve old content
-- 
GitLab