summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-19 16:27:52 -0600
committerJeff Carr <[email protected]>2024-02-19 16:27:52 -0600
commit857d95e4a8139e18782355f5869d5d5af582e53f (patch)
tree46aeb7122a44b2dff22947196db11a2540b52370
parent10eb3685d71a8b4f74a6b3430ef54d56d9aa625d (diff)
allow nil in Show. hopefully this is temporary
-rw-r--r--common.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/common.go b/common.go
index 1e4194c..8d7f8c6 100644
--- a/common.go
+++ b/common.go
@@ -10,6 +10,9 @@ import (
// functions for handling text related GUI elements
func (n *Node) Show() *Node {
+ if n == nil {
+ return n
+ }
if !n.Ready() {
return n
}
@@ -34,6 +37,9 @@ func (n *Node) Show() *Node {
}
func (n *Node) Hide() *Node {
+ if n == nil {
+ return n
+ }
if !n.Ready() {
return n
}