diff --git a/src/kits/device/USBInterface.cpp b/src/kits/device/USBInterface.cpp index 4d32cf3904..f3f3b2876f 100644 --- a/src/kits/device/USBInterface.cpp +++ b/src/kits/device/USBInterface.cpp @@ -155,7 +155,7 @@ BUSBInterface::CountEndpoints() const const BUSBEndpoint * BUSBInterface::EndpointAt(uint32 index) const { - if (index >= fDescriptor.num_endpoints && fEndpoints != NULL) + if (index >= fDescriptor.num_endpoints || fEndpoints == NULL) return NULL; return fEndpoints[index];