From 80c5a1cd9faaa49f8970b832500d063829456ab1 Mon Sep 17 00:00:00 2001 From: N-R-K <79544946+N-R-K@users.noreply.github.com> Date: Wed, 29 Sep 2021 09:44:46 +0600 Subject: 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 --- thumbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'thumbs.c') 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(); } -- cgit v1.2.3-54-g00ecf