usbd: Change TU_ASSERT to TU_VERIFY as the assertion can be hit when bad data is sent from host.

This commit is contained in:
Nathan Conrad 2019-11-04 08:59:29 -05:00
parent c98acd3873
commit a94fe05ecb
1 changed files with 1 additions and 1 deletions

View File

@ -599,7 +599,7 @@ static bool process_control_request(uint8_t rhport, tusb_control_request_t const
// stall control endpoint if driver return false
usbd_control_set_complete_callback(usbd_class_drivers[drvid].control_complete);
TU_LOG2(" %s control request\r\n", _usbd_driver_str[drvid]);
TU_ASSERT(usbd_class_drivers[drvid].control_request != NULL &&
TU_VERIFY(usbd_class_drivers[drvid].control_request != NULL &&
usbd_class_drivers[drvid].control_request(rhport, p_request));
}
}