diff --git a/libraries/SrcWrapper/src/HardwareTimer.cpp b/libraries/SrcWrapper/src/HardwareTimer.cpp index f65a4f4f13..304b169c92 100644 --- a/libraries/SrcWrapper/src/HardwareTimer.cpp +++ b/libraries/SrcWrapper/src/HardwareTimer.cpp @@ -168,6 +168,10 @@ void HardwareTimer::pause() */ void HardwareTimer::pauseChannel(uint32_t channel) { + if ((channel < 1) || (channel > TIMER_CHANNELS)) { + return; + } + int timAssociatedInputChannel; int LLChannel = getLLChannel(channel); if (LLChannel == -1) {