Index: uspace/lib/usbhost/include/usb/host/endpoint.h
===================================================================
--- uspace/lib/usbhost/include/usb/host/endpoint.h	(revision ecbad17c66f206aa044e40815229a72d36e3e544)
+++ uspace/lib/usbhost/include/usb/host/endpoint.h	(revision a4eb520f2cd5290da6c3f4b6778a3b47f080a436)
@@ -116,5 +116,6 @@
 static inline bus_t *endpoint_get_bus(endpoint_t *ep)
 {
-	return ep->device->bus;
+	device_t * const device = ep->device;
+	return device ? device->bus : NULL;
 }
 
