Avoid referencing invalid union member in tree_path_descend

This commit is contained in:
Max Brunsfeld 2016-12-21 13:21:21 -08:00
parent 1595a02692
commit 4136dad5de

View file

@ -37,7 +37,7 @@ static bool tree_path_descend(TreePath *path, TSPoint position) {
if (child->visible) {
array_push(path, child_entry);
return true;
} else if (child->visible_child_count > 0) {
} else if (child->child_count > 0 && child->visible_child_count > 0) {
array_push(path, child_entry);
did_descend = true;
break;