Index: uspace/drv/bus/usb/xhci/endpoint.c
===================================================================
--- uspace/drv/bus/usb/xhci/endpoint.c	(revision c913f71eb6852c8e23cc4333e1aea829429afbe8)
+++ uspace/drv/bus/usb/xhci/endpoint.c	(revision cf5cbac427efc86823996f2ea93a4b747170500b)
@@ -485,5 +485,9 @@
 xhci_endpoint_t *xhci_device_get_endpoint(xhci_device_t *dev, usb_endpoint_t ep)
 {
-	return xhci_endpoint_get(dev->base.endpoints[ep]);
+	endpoint_t *ep_base = dev->base.endpoints[ep];
+	if (!ep_base)
+		return NULL;
+
+	return xhci_endpoint_get(ep_base);
 }
 
