Move libusb_init() call to prevent crash
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Tue, 21 Jun 2011 07:27:21 +0000 (09:27 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Tue, 21 Jun 2011 07:27:21 +0000 (09:27 +0200)
commit3a2847493a8f21b6400868a34ce56b1efd2fa690
tree5ca3fb0ea6ced7e6f294e621063fb9f3c8cebb3b
parenta3d86bdb9327e787644255d5e96e016fe4289225
Move libusb_init() call to prevent crash
on plain ftdi_init() / ftdi_deinit().

Also check ftdi->usb_ctx in ftdi_deinit().

Code based on patch by Uwe Bonnes.
src/ftdi.c