From 4136dad5de28b540281a251cb7703d4a94864085 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Wed, 21 Dec 2016 13:21:21 -0800 Subject: [PATCH] Avoid referencing invalid union member in tree_path_descend --- src/runtime/tree_path.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/tree_path.h b/src/runtime/tree_path.h index bba32718..6fd4ef97 100644 --- a/src/runtime/tree_path.h +++ b/src/runtime/tree_path.h @@ -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;