summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2012-09-12 20:02:52 +0200
committerDaniel Friesel <derf@finalrewind.org>2012-09-12 20:02:52 +0200
commited5b2d5aaf3024d23b131e008d92c7844858373c (patch)
tree0a861e0d330f1ce29567cf83f4083d9593e6045f /src
parent31c67831736e4bde3ef0d4dedb7c11dfc6649fdf (diff)
Fix lossless rotate error message for non-JPEG images
Diffstat (limited to 'src')
-rw-r--r--src/imlib.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/imlib.c b/src/imlib.c
index 5e423f3..d89a5a4 100644
--- a/src/imlib.c
+++ b/src/imlib.c
@@ -1000,6 +1000,7 @@ void feh_edit_inplace(winwidget w, int op)
{
int ret;
Imlib_Image old;
+ Imlib_Load_Error err;
if (!w->file || !w->file->data || !FEH_FILE(w->file->data)->filename)
return;
@@ -1019,8 +1020,11 @@ void feh_edit_inplace(winwidget w, int op)
imlib_image_flip_horizontal();
} else
gib_imlib_image_orientate(old, op);
- gib_imlib_save_image(old, FEH_FILE(w->file->data)->filename);
+ ungib_imlib_save_image_with_error_return(old,
+ FEH_FILE(w->file->data)->filename, &err);
gib_imlib_free_image(old);
+ if (err)
+ im_weprintf(w, "Failed to save image after operation");
feh_reload_image(w, 1, 1);
} else {
im_weprintf(w, "failed to load image from disk to edit it in place");