summaryrefslogtreecommitdiff
path: root/structs.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2021-10-05 10:23:27 -0500
committerJeff Carr <[email protected]>2021-10-05 10:23:27 -0500
commit7ba7b97fa9d385e18c1f9636553db254f14383d0 (patch)
tree973da9d78f143ffd9e7faab06fa9b67499f4fe0f /structs.go
parent11815517c6e566e47d3da61c4b852dd791dbd799 (diff)
BUG: fix potential 'nil' reference
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'structs.go')
-rw-r--r--structs.go7
1 files changed, 7 insertions, 0 deletions
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