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
+5
View File
@@ -197,6 +197,11 @@ void ModelData::cfsSetOffColorLuaOverride(uint8_t n, bool v) {
static TopBarPersistentData _topbarData;
static CustomScreenData* _screenData[MAX_CUSTOM_SCREENS];
bool ModelData::hasScreenData(int screenNum)
{
return _screenData[screenNum] != nullptr;
}
CustomScreenData* ModelData::getScreenData(int screenNum)
{
if (_screenData[screenNum] == nullptr) {