From 7ba7b97fa9d385e18c1f9636553db254f14383d0 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 5 Oct 2021 10:23:27 -0500 Subject: BUG: fix potential 'nil' reference Signed-off-by: Jeff Carr --- structs.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'structs.go') diff --git a/structs.go b/structs.go index 0f1cd1b..59190f6 100644 --- a/structs.go +++ b/structs.go @@ -105,6 +105,13 @@ func (s GuiBox) SetTitle(title string) { return } +func (s GuiBox) Append(child ui.Control, x bool) { + if (s.UiBox == nil) { + return + } + s.UiBox.Append(child, x) +} + func (s GuiBox) InitTab(title string) *ui.Tab { if (s.Window == nil) { return nil -- cgit v1.2.3