From c13db1217d59a6ed4ba1125673e15427361985ac Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Sun, 26 May 2024 15:33:40 -0400 Subject: [PATCH] Fixed a null ptr deref in system.go --- system.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 {