aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ui/grid.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ui/grid.go')
-rw-r--r--lib/ui/grid.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/ui/grid.go b/lib/ui/grid.go
index 04a6dc42..fe1d03e8 100644
--- a/lib/ui/grid.go
+++ b/lib/ui/grid.go
@@ -134,7 +134,9 @@ func (grid *Grid) Draw(ctx *Context) {
continue
}
subctx := ctx.Subcontext(x, y, width, height)
- cell.Content.Draw(subctx)
+ if cell.Content != nil {
+ cell.Content.Draw(subctx)
+ }
}
}
@@ -230,7 +232,9 @@ func (grid *Grid) Invalidate() {
grid.invalidateLayout()
grid.mutex.RLock()
for _, cell := range grid.cells {
- cell.Content.Invalidate()
+ if cell.Content != nil {
+ cell.Content.Invalidate()
+ }
}
grid.mutex.RUnlock()
}