1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-12 19:10:32 +03:00

[H7] USB Middlewares change: Fix memory corruption

This commit is contained in:
Dominic Clifton 2019-05-09 14:10:46 +09:00 committed by jflyper
parent a8e9dd94e8
commit 8a1a75e2ef

View file

@ -400,7 +400,7 @@ uint8_t USBD_HID_SendReport (USBD_HandleTypeDef *pdev,
{
USBD_HID_HandleTypeDef *hhid = (USBD_HID_HandleTypeDef*)pdev->pHID_ClassData;
if (pdev->dev_state == USBD_STATE_CONFIGURED )
if (pdev->dev_state == USBD_STATE_CONFIGURED && hhid)
{
if(hhid->state == HID_IDLE)
{