diff options
-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; } |