mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-12 19:10:32 +03:00
[H7][LIB][USB] Middlewares change: Fix memory corruption
Application of [H7] USB LIB Middlewares change: Avoid null hhid from being deferenced to V1.6.0
This commit is contained in:
parent
fd11348dce
commit
0397a1618a
1 changed files with 1 additions and 1 deletions
|
@ -532,7 +532,7 @@ uint8_t USBD_HID_SendReport(USBD_HandleTypeDef *pdev, uint8_t *report, uint16_t
|
|||
{
|
||||
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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue