From b321a719d314e30e7038fdd65792e46bcb3edba0 Mon Sep 17 00:00:00 2001 From: Christian Soffke Date: Fri, 30 Dec 2022 09:45:05 +0100 Subject: option_select & time_menu : Fix unbalanced push/pop activity Change-Id: Icabbabb16b2f173168a441af474ee8403b908dd4 --- apps/gui/option_select.c | 3 +++ apps/menus/time_menu.c | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/gui/option_select.c b/apps/gui/option_select.c index ca16b5b05f..8839f42e42 100644 --- a/apps/gui/option_select.c +++ b/apps/gui/option_select.c @@ -565,7 +565,10 @@ bool option_screen(const struct settings_list *setting, function(*variable); } else if(default_event_handler(action) == SYS_USB_CONNECTED) + { + pop_current_activity(); return true; + } /* callback */ if (function && !cb_on_select_only) function(*variable); diff --git a/apps/menus/time_menu.c b/apps/menus/time_menu.c index abf9c23cd0..6043573684 100644 --- a/apps/menus/time_menu.c +++ b/apps/menus/time_menu.c @@ -297,8 +297,10 @@ int time_screen(void* ignored) because they always report "02:02:02" as time. */ struct tm *tm = get_time(); - if (tm->tm_year==102 && tm->tm_hour==2 && tm->tm_min==2 && tm->tm_sec==2) { + if (tm->tm_year==102 && tm->tm_hour==2 && tm->tm_min==2 && tm->tm_sec==2) + { splash(4*HZ, "Can't set time/date due to hardware issues!"); + pop_current_activity(); return 0; } #endif -- cgit v1.2.3