aboutsummaryrefslogtreecommitdiffstats
path: root/thumbs.c
diff options
context:
space:
mode:
authorN-R-K <79544946+N-R-K@users.noreply.github.com>2021-09-29 05:44:46 +0200
committerGitHub <noreply@github.com>2021-09-29 05:44:46 +0200
commit80c5a1cd9faaa49f8970b832500d063829456ab1 (patch)
tree25330fa5cef1506598ce647ffef0854878738a2e /thumbs.c
parent0ee05d29f0649185e93368dd593418083c3751ad (diff)
downloadnsxiv-80c5a1cd9faaa49f8970b832500d063829456ab1.tar.zst
fix: crashing on bad exif thumbnail (#75)
this does not need to be a fatal error. if im is NULL we're going to load it with imlib2 anyways. one other problem this solves is that before, due to the fatal error, the tmpfile opened under /tmp wouldn't get cleaned up. Closes: https://github.com/nsxiv/nsxiv/issues/69
Diffstat (limited to 'thumbs.c')
-rw-r--r--thumbs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/thumbs.c b/thumbs.c
index c74d846..40cd6bd 100644
--- a/thumbs.c
+++ b/thumbs.c
@@ -312,7 +312,7 @@ bool tns_load(tns_t *tns, int n, bool force, bool cache_only)
}
if (w >= maxwh || h >= maxwh) {
if ((im = imlib_create_cropped_image(x, y, w, h)) == NULL)
- error(EXIT_FAILURE, ENOMEM, NULL);
+ error(0, 0, "%s: error generating thumbnail", file->name);
}
imlib_free_image_and_decache();
}