From 72ce448bf97cfc46f5153468ef5a7e3327ca3673 Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Fri, 29 Jun 2007 18:36:12 +0200 Subject: [PATCH 1/1] only close the parallel port when it was really openend --- usb-driver.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/usb-driver.c b/usb-driver.c index be3b94f..e620145 100644 --- a/usb-driver.c +++ b/usb-driver.c @@ -636,7 +636,10 @@ int do_wdioctl(int fd, unsigned int request, unsigned char *wdioctl) { #ifndef NO_WINDRVR ret = (*ioctl_func) (fd, request, wdioctl); #else - pport->close(cr->hCard); + if (pport) + pport->close(cr->hCard); + + pport = NULL; #endif } break; -- 2.39.5