diff --git a/gui.go b/gui.go index 4ff91ec..119b533 100644 --- a/gui.go +++ b/gui.go @@ -572,7 +572,7 @@ func corner(v *View, directions byte) rune { // drawFrameCorners draws the corners of the view. func (g *Gui) drawFrameCorners(v *View, fgColor, bgColor Attribute) error { if v.y0 == v.y1 { - if !g.SupportOverlaps { + if !g.SupportOverlaps && v.x0 >= 0 && v.x1 >= 0 && v.y0 >= 0 && v.x0 < g.maxX && v.x1 < g.maxX && v.y0 < g.maxY { if err := g.SetRune(v.x0, v.y0, '╶', fgColor, bgColor); err != nil { return err }