diff USBLib/Windows/USB/UsbDevice.cs @ 61:2b24666cd759

Fixed errors in Windows USB enumeration and LibUsbDotNet configuration descriptor code
author Ivo Smits <Ivo@UCIS.nl>
date Sun, 13 Oct 2013 00:48:28 +0200
parents 3424fa5a12c9
children edc41c861d96
line wrap: on
line diff
--- a/USBLib/Windows/USB/UsbDevice.cs	Sat Oct 12 16:35:24 2013 +0200
+++ b/USBLib/Windows/USB/UsbDevice.cs	Sun Oct 13 00:48:28 2013 +0200
@@ -142,6 +142,7 @@
 			}
 			isHostController = false;
 			DeviceNode parent = node.GetParent();
+			if (parent == null) return null;
 			Boolean isHostControllerA;
 			UsbDevice usbdev = GetUsbDevice(parent, out isHostControllerA);
 			if (isHostControllerA) return usbdev;