diff --git a/system.go b/system.go index c1fb1db..9da1094 100644 --- a/system.go +++ b/system.go @@ -241,7 +241,9 @@ func (window *window) afterEvent () { // set child bounds childBounds := window.metrics.bounds childBounds = childBounds.Sub(childBounds.Min) - window.root.SetBounds(childBounds) + if window.root != nil { + window.root.SetBounds(childBounds) + } // full relayout/redraw if window.root != nil {