From 2d214dbbcbf154eea65b056b2cb92c7471edbccc Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Thu, 16 Jul 2009 19:51:58 +0000 Subject: [PATCH] Fixed wrong check git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31608 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/device/USBInterface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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];