1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 21:05:35 +03:00

FIX: CRSF no active serial port and telem causing hardfault (#12496)

* FIX: no active serial port and telem causing hardfault
This commit is contained in:
J Blackman 2023-03-11 06:50:45 +11:00 committed by GitHub
parent 6d4921e5bf
commit 43f1c74c64
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -608,7 +608,9 @@ void crsfRxSendTelemetryData(void)
{
// if there is telemetry data to write
if (telemetryBufLen > 0) {
serialWriteBuf(serialPort, telemetryBuf, telemetryBufLen);
if (serialPort != NULL) {
serialWriteBuf(serialPort, telemetryBuf, telemetryBufLen);
}
telemetryBufLen = 0; // reset telemetry buffer
}
}