core: re-add one more conditional
authorNathan Hjelm <hjelmn@me.com>
Sun, 6 Mar 2016 22:04:02 +0000 (15:04 -0700)
committerNathan Hjelm <hjelmn@me.com>
Sun, 6 Mar 2016 22:04:02 +0000 (15:04 -0700)
Signed-off-by: Nathan Hjelm <hjelmn@me.com>
libusb/descriptor.c
libusb/version_nano.h

index 14657d1..4c9435f 100644 (file)
@@ -198,9 +198,11 @@ static void clear_interface(struct libusb_interface *usb_interface)
                                (struct libusb_interface_descriptor *)
                                usb_interface->altsetting + i;
                        free((void *) ifp->extra);
-                       for (j = 0; j < ifp->bNumEndpoints; j++)
-                               clear_endpoint((struct libusb_endpoint_descriptor *)
-                                              ifp->endpoint + j);
+                       if (ifp->endpoint) {
+                               for (j = 0; j < ifp->bNumEndpoints; j++)
+                                       clear_endpoint((struct libusb_endpoint_descriptor *)
+                                                      ifp->endpoint + j);
+                       }
                        free((void *) ifp->endpoint);
                }
        }
index 21ad375..cb99241 100644 (file)
@@ -1 +1 @@
-#define LIBUSB_NANO 11101
+#define LIBUSB_NANO 11102