From 8b79bc33f37db12cbb672bdb47dcfeb0f2030bce Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 31 Aug 2011 16:51:58 +0200 Subject: feh_reload_image: Always die if reload failed This fixes a segfault in --reload when the image becomes unloadable while feh is running. Note that this does not affect --reload with more than one file: If the current image is removed, feh will simply jump to the next image. feh will only quit if the file still exists, but can no longer be loaded. --- src/imlib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/imlib.c') diff --git a/src/imlib.c b/src/imlib.c index 47031bd..ed3fc12 100644 --- a/src/imlib.c +++ b/src/imlib.c @@ -801,7 +801,7 @@ void feh_edit_inplace(winwidget w, int op) if (!strcmp(gib_imlib_image_format(w->im), "jpeg")) { feh_edit_inplace_lossless(w, op); - feh_reload_image(w, 1, 1); + feh_reload_image(w, 1); return; } @@ -817,7 +817,7 @@ void feh_edit_inplace(winwidget w, int op) gib_imlib_image_orientate(old, op); gib_imlib_save_image(old, FEH_FILE(w->file->data)->filename); gib_imlib_free_image(old); - feh_reload_image(w, 1, 1); + feh_reload_image(w, 1); } else { im_weprintf(w, "failed to load image from disk to edit it in place"); } -- cgit v1.2.3