Add missing variable initialization in MSP_VTX_CONFIG

If the `vtxDevice` was not valid then the `vtxStatus` variable never got initialized but was still used in the pit mode flag determination - leading to random behavior.
This commit is contained in:
Bruce Luckcuck 2019-09-11 09:00:51 -04:00
parent 2a18209492
commit ad4d46a1f9
1 changed files with 1 additions and 1 deletions

View File

@ -1676,7 +1676,7 @@ static bool mspProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst)
case MSP_VTX_CONFIG:
{
const vtxDevice_t *vtxDevice = vtxCommonDevice();
unsigned vtxStatus;
unsigned vtxStatus = 0;
vtxDevType_e vtxType = VTXDEV_UNKNOWN;
uint8_t deviceIsReady = 0;
if (vtxDevice) {