C++ wrapper: Reset internal USB device pointer on Context::close()
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Mon, 16 Jan 2012 14:44:31 +0000 (15:44 +0100)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Mon, 16 Jan 2012 14:44:31 +0000 (15:44 +0100)
ftdipp/ftdi.cpp

index f1c1cef..e2755d8 100644 (file)
@@ -132,6 +132,7 @@ int Context::open(struct libusb_device *dev)
 int Context::close()
 {
     d->open = false;
+    d->dev = 0;
     return ftdi_usb_close(d->ftdi);
 }