X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/049e9309637cd057689cf273b2023afb0d6876ae..08eeceeb5fe1fe17d5703123e477dc6fd06af5ff:/LUFA/Drivers/USB/Class/Common/HIDParser.c diff --git a/LUFA/Drivers/USB/Class/Common/HIDParser.c b/LUFA/Drivers/USB/Class/Common/HIDParser.c index b90f89eb2..eb2f14c35 100644 --- a/LUFA/Drivers/USB/Class/Common/HIDParser.c +++ b/LUFA/Drivers/USB/Class/Common/HIDParser.c @@ -290,6 +290,9 @@ uint8_t USB_ProcessHIDReport(const uint8_t* ReportData, bool USB_GetHIDReportItemInfo(const uint8_t* ReportData, HID_ReportItem_t* const ReportItem) { + if (ReportItem == NULL) + return false; + uint16_t DataBitsRem = ReportItem->Attributes.BitSize; uint16_t CurrentBit = ReportItem->BitOffset; uint32_t BitMask = (1 << 0); @@ -320,6 +323,9 @@ bool USB_GetHIDReportItemInfo(const uint8_t* ReportData, void USB_SetHIDReportItemInfo(uint8_t* ReportData, HID_ReportItem_t* const ReportItem) { + if (ReportItem == NULL) + return; + uint16_t DataBitsRem = ReportItem->Attributes.BitSize; uint16_t CurrentBit = ReportItem->BitOffset; uint32_t BitMask = (1 << 0);