usb: fixed potential crash.
* The active interface may be null. This actually happens with a Lasmex USB speaker in case it is turned on.
This commit is contained in:
parent
1152f83ddc
commit
59750213e7
@ -465,6 +465,9 @@ Device::InitEndpoints(int32 interfaceIndex)
|
||||
|
||||
usb_interface_info* interfaceInfo
|
||||
= fCurrentConfiguration->interface[j].active;
|
||||
if (interfaceInfo == NULL)
|
||||
continue;
|
||||
|
||||
for (size_t i = 0; i < interfaceInfo->endpoint_count; i++) {
|
||||
usb_endpoint_info* endpoint = &interfaceInfo->endpoint[i];
|
||||
Pipe* pipe = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user