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.
+1 −1
1 file changed
- M thumbs.c +1 −1
| @@ -312,7 +312,7 @@ bool tns_load(tns_t *tns, int n, bool force, bool cache_only) | |||
| 312 | 312 | } | |
| 313 | 313 | if (w >= maxwh || h >= maxwh) { | |
| 314 | 314 | 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); | |
| 316 | 316 | } | |
| 317 | 317 | imlib_free_image_and_decache(); | |
| 318 | 318 | } | |