git://developer.intra2net.com
/
libftdi
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
54357fa
)
Backport possible NULL pointer crash fix from master branch
author
Thomas Jarosch
<thomas.jarosch@intra2net.com>
Sat, 28 Jul 2012 16:04:51 +0000 (18:04 +0200)
committer
Thomas Jarosch
<thomas.jarosch@intra2net.com>
Sat, 28 Jul 2012 16:04:51 +0000 (18:04 +0200)
src/ftdi.c
patch
|
blob
|
blame
|
history
diff --git
a/src/ftdi.c
b/src/ftdi.c
index
980622d
..
2d47028
100644
(file)
--- a/
src/ftdi.c
+++ b/
src/ftdi.c
@@
-45,7
+45,10
@@
#endif
#define ftdi_error_return(code, str) do { \
- ftdi->error_str = str; \
+ if ( ftdi ) \
+ ftdi->error_str = str; \
+ else \
+ fprintf(stderr, str); \
return code; \
} while(0);