From 56d422789706d91edb301373330c259aa2955385 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Sun, 16 Oct 2022 12:53:34 -0400 Subject: 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 --- apps/gui/yesno.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'apps/gui') 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 -- cgit v1.2.3