From 173bafd8007ed844eb59ae5882427b0a5a5b98a9 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Fri, 20 Feb 2015 18:42:24 +0100 Subject: devusb: fix debug ctl nil crash --- sys/src/9/port/devusb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/src') diff --git a/sys/src/9/port/devusb.c b/sys/src/9/port/devusb.c index 1e0ab183e..73928a04d 100644 --- a/sys/src/9/port/devusb.c +++ b/sys/src/9/port/devusb.c @@ -1347,7 +1347,8 @@ usbctl(void *a, long n) print("usb: debug %d\n", debug); for(i = 0; i < epmax; i++) if((ep = getep(i)) != nil){ - ep->hp->debug(ep->hp, debug); + if(ep->hp->debug != nil) + ep->hp->debug(ep->hp, debug); putep(ep); } break; -- cgit v1.2.3