Avoiding panics for empty tree views.

pull/396/merge
Oliver 4 years ago
parent 3a5c6317e4
commit ae3d8cac5e

@ -409,6 +409,9 @@ func (t *TreeView) process() {
// Determine visible nodes and their placement.
var graphicsOffset, maxTextX int
t.nodes = nil
if t.root == nil {
return
}
selectedIndex := -1
topLevelGraphicsX := -1
if t.graphics {

Loading…
Cancel
Save