diff options
author | jcid <devnull@localhost> | 2008-01-08 13:09:28 +0100 |
---|---|---|
committer | jcid <devnull@localhost> | 2008-01-08 13:09:28 +0100 |
commit | 445f55b9280aba6357488e2e466d71697f77e400 (patch) | |
tree | 032a8289b18f6eb0cfaf10c9bf93d457af91b9c7 | |
parent | bb5ae3f2844122e4f2878119e36ca8727cf74b9b (diff) |
+ - Fixed a segfault in cookies.c when no .dillo directory exists.
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | src/cookies.c | 6 |
2 files changed, 5 insertions, 2 deletions
@@ -68,6 +68,7 @@ dillo-fltk2 - Made the stop button sensitive when loading an image. - Added more statics in dpi, const in pixmaps, and removed redundant includes. - Made cleanups in prefs (hiding local data/defs/symbols). + - Fixed a segfault in cookies.c when no .dillo directory exists. Patches: place +- Fixed a problem with locally-installed dpis. - Added code for optional image loading (nice interface) very advanced! diff --git a/src/cookies.c b/src/cookies.c index f6002842..63b98837 100644 --- a/src/cookies.c +++ b/src/cookies.c @@ -101,8 +101,10 @@ static FILE *Cookies_fopen(const char *filename, char *init_str) } } - /* set close on exec */ - fcntl(fileno(F_in), F_SETFD, FD_CLOEXEC | fcntl(fileno(F_in), F_GETFD)); + if (F_in) { + /* set close on exec */ + fcntl(fileno(F_in), F_SETFD, FD_CLOEXEC | fcntl(fileno(F_in), F_GETFD)); + } return F_in; } |