Skip to content

Commit bf2cafe

Browse files
committed
cleanup ftdi context if it was initialized
uses the internal structure of libftdi as seen in https://www.intra2net.com/en/developer/libftdi/documentation/ftdi_8c_source.html#l00091 fixes #7
1 parent 4d3ab17 commit bf2cafe

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/mpsse.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ void Close(struct mpsse_context *mpsse)
237237
{
238238
if(mpsse)
239239
{
240-
if(mpsse->open)
240+
if(mpsse->ftdi.eeprom)
241241
{
242242
ftdi_set_bitmode(&mpsse->ftdi, 0, BITMODE_RESET);
243243
ftdi_usb_close(&mpsse->ftdi);

0 commit comments

Comments
 (0)