From bdce0bc60cb6e938ce39a0defe5b24249bc66a99 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 13 Oct 2021 15:18:41 +0200 Subject: [PATCH] fix(group) fix infinite loop --- src/core/lv_group.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/lv_group.c b/src/core/lv_group.c index 8050caf2c..9a1664672 100644 --- a/src/core/lv_group.c +++ b/src/core/lv_group.c @@ -399,10 +399,12 @@ static void focus_next_core(lv_group_t * group, void * (*begin)(const lv_ll_t *) *If any parent is hidden, the object is also hidden)*/ lv_obj_t * parent = *obj_next; while(parent) { - if(lv_obj_has_flag(parent, LV_OBJ_FLAG_HIDDEN)) continue; + if(lv_obj_has_flag(parent, LV_OBJ_FLAG_HIDDEN)) break; parent = lv_obj_get_parent(parent); } + if(parent && lv_obj_has_flag(parent, LV_OBJ_FLAG_HIDDEN)) continue; + /*If we got her a good candidate is found*/ break; }