fix(color): potential crash when configuring external module if trainer mode set to Master/SBUS (#6623)

This commit is contained in:
philmoz
2025-10-04 13:54:23 +10:00
committed by GitHub
parent a5707c8a91
commit 000895d6ed
@@ -750,6 +750,7 @@ ModulePage::ModulePage(uint8_t moduleIdx) : Page(ICON_MODEL_SETUP)
MODULE_TYPE_COUNT - 1, GET_DEFAULT(md->type));
moduleChoice->setAvailableHandler([=](int8_t moduleType) {
if (moduleType == MODULE_TYPE_NONE) return true;
return moduleIdx == INTERNAL_MODULE ? isInternalModuleAvailable(moduleType)
: isExternalModuleAvailable(moduleType);
});