Browse Source

Ztex device removal segfault fixed

nfactor-troky
nelisky 13 years ago
parent
commit
a960087c0a
  1. 2
      libztex.c

2
libztex.c

@ -420,7 +420,7 @@ int libztex_scanDevices (struct libztex_dev_list*** devs_p) {
int libztex_sendHashData (struct libztex_device *ztex, unsigned char *sendbuf) { int libztex_sendHashData (struct libztex_device *ztex, unsigned char *sendbuf) {
int cnt; int cnt;
if (ztex->hndl == NULL) { if (ztex == NULL || ztex->hndl == NULL) {
return 0; return 0;
} }
cnt = libusb_control_transfer(ztex->hndl, 0x40, 0x80, 0, 0, sendbuf, 44, 1000); cnt = libusb_control_transfer(ztex->hndl, 0x40, 0x80, 0, 0, sendbuf, 44, 1000);

Loading…
Cancel
Save