From e4630e4c7f3f437dc4fc1f4296571c1160fcc7d4 Mon Sep 17 00:00:00 2001 From: philmoz Date: Wed, 29 May 2024 09:18:16 +1000 Subject: [PATCH] fix(color): stop attempt to load themes when in emergency mode (#5075) --- radio/src/gui/colorlcd/theme_manager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/radio/src/gui/colorlcd/theme_manager.cpp b/radio/src/gui/colorlcd/theme_manager.cpp index 5bf65cd69..83d7a1ec4 100644 --- a/radio/src/gui/colorlcd/theme_manager.cpp +++ b/radio/src/gui/colorlcd/theme_manager.cpp @@ -20,6 +20,7 @@ */ #include "theme_manager.h" +#include "hal/abnormal_reboot.h" #include "../../storage/sdcard_common.h" #include "../../storage/yaml/yaml_bits.h" #include "../../storage/yaml/yaml_tree_walker.h" @@ -327,7 +328,8 @@ void ThemePersistance::scanForThemes() void ThemePersistance::refresh() { - scanForThemes(); + if (!UNEXPECTED_SHUTDOWN()) + scanForThemes(); insertDefaultTheme(); }