diff options
Diffstat (limited to 'desktop/tree.c')
-rw-r--r-- | desktop/tree.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/desktop/tree.c b/desktop/tree.c index b0fe2c6e3..748e7b952 100644 --- a/desktop/tree.c +++ b/desktop/tree.c @@ -1802,10 +1802,6 @@ void tree_draw(struct tree *tree, int x, int y, assert(tree != NULL); assert(tree->root != NULL); - /* don't draw empty trees or trees with redraw flag set to false */ - if (tree->root->child == NULL || !tree->redraw) - return; - /* Set up clip rectangle */ clip.x0 = x + clip_x; clip.y0 = y + clip_y; @@ -1817,6 +1813,10 @@ void tree_draw(struct tree *tree, int x, int y, plot.rectangle(clip.x0, clip.y0, clip.x1, clip.y1, &plot_style_fill_tree_background); + /* don't draw empty trees or trees with redraw flag set to false */ + if (tree->root->child == NULL || !tree->redraw) + return; + /* Draw the tree */ tree_draw_tree(tree, tree->root, x, y, clip); |