summaryrefslogtreecommitdiff
path: root/stack.go
diff options
context:
space:
mode:
Diffstat (limited to 'stack.go')
-rw-r--r--stack.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/stack.go b/stack.go
index 4311b37..c534ff2 100644
--- a/stack.go
+++ b/stack.go
@@ -133,7 +133,11 @@ _=ymargin
if current != nil { // connect first left to first right
current.neighbor = c
}
- current = as[0] // next left is first subwidget
+ if len(as) != 0 {
+ current = as[0] // next left is first subwidget
+ } else {
+ current = nil // spaces don't have allocation data
+ }
}
allocations = append(allocations, as...)
if s.orientation == horizontal {