Protect against segfault if device is closed or ftdi context is invalid
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Fri, 19 Feb 2010 22:38:20 +0000 (23:38 +0100)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Fri, 19 Feb 2010 22:44:37 +0000 (23:44 +0100)
commit22a1b5c16cfded0f207e608f57f742db404c5fe8
tree50b78c653d6b7ecb641219337faa2f077a4572df
parentb113915025b9bdcb85112897727953f55818e90f
Protect against segfault if device is closed or ftdi context is invalid

This will help mulithreaded applications which do proper
locking around the ftdi_xxx() functions and one thread
already closed the USB device -> Zonk!

Ported to libftdi-1.0 with additional checks.

Thanks to Thomas Klose for reporting the issue.
src/ftdi.c