diff options
author | N-R-K <79544946+N-R-K@users.noreply.github.com> | 2021-09-29 09:44:46 +0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-29 06:44:46 +0300 |
commit | 80c5a1cd9faaa49f8970b832500d063829456ab1 (patch) | |
tree | 25330fa5cef1506598ce647ffef0854878738a2e | |
parent | 0ee05d29f0649185e93368dd593418083c3751ad (diff) |
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
-rw-r--r-- | thumbs.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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(); } |