only close the parallel port when it was really openend
This commit is contained in:
parent
c21a2deca2
commit
72ce448bf9
@ -636,7 +636,10 @@ int do_wdioctl(int fd, unsigned int request, unsigned char *wdioctl) {
|
|||||||
#ifndef NO_WINDRVR
|
#ifndef NO_WINDRVR
|
||||||
ret = (*ioctl_func) (fd, request, wdioctl);
|
ret = (*ioctl_func) (fd, request, wdioctl);
|
||||||
#else
|
#else
|
||||||
pport->close(cr->hCard);
|
if (pport)
|
||||||
|
pport->close(cr->hCard);
|
||||||
|
|
||||||
|
pport = NULL;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user