diff options
author | NRK <nrk@disroot.org> | 2024-06-13 00:03:41 +0200 |
---|---|---|
committer | NRK <nrk@disroot.org> | 2024-06-18 17:11:36 +0200 |
commit | b6d9e7d24f8e974749c41d8eaa7e21273548ff7f (patch) | |
tree | f9030794451a1da79ec61fbb562d95d1d464ff45 | |
parent | 36d5b27fff21f4b8475a594dabbd7b59630c9bee (diff) | |
download | nsxiv-b6d9e7d24f8e974749c41d8eaa7e21273548ff7f.tar.zst |
fix: crash when cache directory is not present
to reproduce:
( unset HOME XDG_CACHE_HOME; nsxiv -t ~/pictures; )
the code never really worked without a cache_dir going back to
original sxiv. so just fatally error out instead of crashing
with a null pointer dereference.
-rw-r--r-- | thumbs.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -181,7 +181,7 @@ void tns_init(tns_t *tns, fileinfo_t *tns_files, const int *cnt, int *sel, win_t memcpy(cache_tmpfile, cache_dir, len - 1); cache_tmpfile_base = cache_tmpfile + len - 1; } else { - error(0, 0, "Cache directory not found"); + error(EXIT_FAILURE, 0, "Cache directory not found"); } } |