mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 12:25:20 +03:00
Merge pull request #8260 from jflyper/bfdev-h7-fix-usb-lib-avoid-null-hhid-reference
[H7] USB LIB Middlewares change: Avoid null hhid from being deferenced
This commit is contained in:
commit
7d7d1b16b4
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue