Fixed a null ptr deref in system.go

This commit is contained in:
Sasha Koshka 2024-05-26 15:33:40 -04:00
parent c0124bf232
commit c13db1217d

View File

@ -241,7 +241,9 @@ func (window *window) afterEvent () {
// set child bounds // set child bounds
childBounds := window.metrics.bounds childBounds := window.metrics.bounds
childBounds = childBounds.Sub(childBounds.Min) childBounds = childBounds.Sub(childBounds.Min)
window.root.SetBounds(childBounds) if window.root != nil {
window.root.SetBounds(childBounds)
}
// full relayout/redraw // full relayout/redraw
if window.root != nil { if window.root != nil {