From 4e4af2fe96c72fb04d9897d78608a6bebfefc450 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Tue, 25 Nov 2025 16:53:12 -0500 Subject: [PATCH] Bugfix FS#13696 - ID3 year with substring cause panic The issue was the false case returning NULL for children elements instead just ignore the false branch for everything but SKIN_TOKEN_SUBLINE_TIMEOUT_HIDE Change-Id: Ie0f4f51646faf116e563ab7e60d52d18759f4220 --- apps/gui/skin_engine/skin_render.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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) {