summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2022-10-16 12:53:34 -0400
committerWilliam Wilgus <wilgus.william@gmail.com>2022-10-16 13:02:12 -0400
commit56d422789706d91edb301373330c259aa2955385 (patch)
tree60cc5878e66a58de57f6c45b1b246d70e462f615
parent5e864ecde98fbb2f115f75a3c5c13fa871f4d3f9 (diff)
downloadrockbox-56d4227897.tar.gz
rockbox-56d4227897.zip
yesno_res gui_syncyesno_run fix scroll run-on bug
the GUI_EVENT_NEED_UI_UPDATE event was not canceled till after the call to scroll_stop this resulted in the scrolled line being re-added after the function was done causing a crash thanks spork, amachronic Change-Id: I2e484a2b877f6da63171eb997f62a21e95ca9bfc
-rw-r--r--apps/gui/yesno.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/gui/yesno.c b/apps/gui/yesno.c
index a79b8ae644..c763753cd7 100644
--- a/apps/gui/yesno.c
+++ b/apps/gui/yesno.c
@@ -253,14 +253,15 @@ enum yesno_res gui_syncyesno_run(const struct text_message * main_message,
if(result_displayed)
sleep(HZ);
+ exit:
+ remove_event_ex(GUI_EVENT_NEED_UI_UPDATE, gui_yesno_ui_update, &yn[0]);
+
FOR_NB_SCREENS(i)
{
screens[i].scroll_stop_viewport(yn[i].vp);
viewportmanager_theme_undo(i, true);
}
- exit:
- remove_event_ex(GUI_EVENT_NEED_UI_UPDATE, gui_yesno_ui_update, &yn[0]);
#ifdef HAVE_TOUCHSCREEN
touchscreen_set_mode(old_mode);
#endif