Merge pull request #7808 from hydra/bf-fix-crash-bug-1
Fix memory corruption in USB code.
This commit is contained in:
commit
df0d132d33
|
@ -398,7 +398,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…
Reference in New Issue