Krolyxon
Commit 80c5a1c

Branches

Refs →

nsxiv80c5a1c

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.
Author
N-R-K
Date
2021-09-29 09:44 +0600
Committer
GitHub · 2021-09-29 06:44 +0300
Parent
0ee05d2
Commit
80c5a1cd9faaa49f8970b832500d063829456ab1

+1 −1

1 file changed

  1. M thumbs.c +1 −1
M thumbs.c View
@@ -312,7 +312,7 @@ bool tns_load(tns_t *tns, int n, bool force, bool cache_only)
312312 }
313313 if (w >= maxwh || h >= maxwh) {
314314 if ((im = imlib_create_cropped_image(x, y, w, h)) == NULL)
315− error(EXIT_FAILURE, ENOMEM, NULL);
315+ error(0, 0, "%s: error generating thumbnail", file->name);
316316 }
317317 imlib_free_image_and_decache();
318318 }