#ifndef NO_WINDRVR
ret = (*ioctl_func) (fd, request, wdioctl);
#else
- pport->close(cr->hCard);
+ if (pport)
+ pport->close(cr->hCard);
+
+ pport = NULL;
#endif
}
break;
if (!func)
func = (int (*) (const char*, int)) dlsym(RTLD_NEXT, "access");
-
- if (!strcmp(pathname, "/dev/windrvr6")) {
+
+ if (pathname && !strcmp(pathname, "/dev/windrvr6")) {
return 0;
} else {
return (*func)(pathname, mode);