Commit 528ba79a authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #4774 from DonLakeFlyer/RadioCrash

Setup - Radio: Fix crash from bogus param values
parents 644225fa a6f6fdcc
......@@ -646,7 +646,7 @@ void RadioComponentController::_setInternalCalibrationValuesFromParameters(void)
if (paramFact) {
paramChannel = paramFact->rawValue().toInt();
if (paramChannel != 0) {
if (paramChannel > 0 && paramChannel <= _chanMax()) {
_rgFunctionChannelMapping[i] = paramChannel - 1;
_rgChannelInfo[paramChannel - 1].function = (enum rcCalFunctions)i;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment