dirty fix #58 (panic on minimizing windows)

This commit is contained in:
faiface 2017-11-08 22:28:32 +01:00
parent cc4c905b49
commit e554b1e3c1
1 changed files with 6 additions and 0 deletions

View File

@ -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