fix(color): radio may crash if model yaml file does not contain any screen definitions (#6916)

This commit is contained in:
philmoz
2026-01-01 11:22:52 +10:00
committed by GitHub
parent 5f37969b27
commit e52a2e27c4
3 changed files with 9 additions and 0 deletions
+3
View File
@@ -161,6 +161,9 @@ static void sanitizeMixerLines()
void postModelLoad(bool alarms)
{
#if defined(COLORLCD)
if (!g_model.hasScreenData(0))
LayoutFactory::loadDefaultLayout();
if (g_model.topbarWidgetWidth[0] == 0) {
// Set default width for top bar widgets
for (int i = 0; i < MAX_TOPBAR_ZONES; i += 1)