diff --git a/apps/gui/skin_engine/skin_render.c b/apps/gui/skin_engine/skin_render.c index 2f00daba5b..aef5dae899 100644 --- a/apps/gui/skin_engine/skin_render.c +++ b/apps/gui/skin_engine/skin_render.c @@ -624,7 +624,7 @@ static bool skin_render_line(struct skin_element* line, struct skin_draw_info *i static int get_subline_timeout(struct gui_wps *gwps, struct skin_element* line) { struct skin_element *element=line; - struct wps_token *token; + struct wps_token *token = NULL; int retval = DEFAULT_SUBLINE_TIME_MULTIPLIER*TIMEOUT_UNIT; if (element->type == LINE) { @@ -662,9 +662,12 @@ static int get_subline_timeout(struct gui_wps *gwps, struct skin_element* line) struct conditional *conditional = SKINOFFSETTOPTR(skin_buffer, element->data); int val = evaluate_conditional(gwps, 0, conditional, element->children_count); - int tmoval = get_subline_timeout(gwps, get_child(element->children, val)); - if (tmoval >= 0) - return MAX(retval, tmoval); /* Bugfix %t()%?CONDITIONAL tmo ignored */ + if (val >= 0 || (token && token->type == SKIN_TOKEN_SUBLINE_TIMEOUT_HIDE)) + {/* only need tmoval in false case if SKIN_TOKEN_SUBLINE_TIMEOUT_HIDE */ + int tmoval = get_subline_timeout(gwps, get_child(element->children, val)); + if (tmoval >= 0) + return MAX(retval, tmoval); /* Bugfix %t()%?CONDITIONAL tmo ignored */ + } } else if (type == COMMENT) {