[gthumb] jpeg loader: set the error if the operation was cancelled
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] jpeg loader: set the error if the operation was cancelled
- Date: Sat, 15 Sep 2012 12:07:12 +0000 (UTC)
commit e50d1c3ddd1347062dcfdd33ee9a3c0e5783dfb6
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sat Sep 15 11:28:36 2012 +0200
jpeg loader: set the error if the operation was cancelled
extensions/cairo_io/cairo-image-surface-jpeg.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/extensions/cairo_io/cairo-image-surface-jpeg.c b/extensions/cairo_io/cairo-image-surface-jpeg.c
index 562ded5..3d685ed 100644
--- a/extensions/cairo_io/cairo-image-surface-jpeg.c
+++ b/extensions/cairo_io/cairo-image-surface-jpeg.c
@@ -532,8 +532,10 @@ _cairo_image_surface_create_from_jpeg (GInputStream *istream,
jpeg_finish_decompress (&srcinfo);
jpeg_destroy_decompress (&srcinfo);
}
- else
+ else {
jpeg_destroy ((j_common_ptr) &srcinfo);
+ g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_CANCELLED, "");
+ }
cairo_surface_destroy (surface);
g_free (in_buffer);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]