diff options
author | Wim Taymans <wtaymans@redhat.com> | 2016-01-14 15:46:35 +0100 |
---|---|---|
committer | Hubert Figuière <hub@figuiere.net> | 2016-01-24 13:32:14 -0500 |
commit | 61b4f359b8ce310dae3f0d1fd51274c6537172ee (patch) | |
tree | de06e8c3d025ea04a6d245f2c09e1ed4c272ad86 | |
parent | c6cedb1a7c4c70c5652ddbef3ea2381db233e159 (diff) |
Bug 93712 - pixbuf-loader: set GError on failure0.0.8-api
When gdk_pixbuf__or_image_stop_load returns FALSE, the caller can expect
the GError to be set.
Signed-off-by: Hubert Figuière <hub@figuiere.net>
-rw-r--r-- | gnome/pixbuf-loader.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gnome/pixbuf-loader.c b/gnome/pixbuf-loader.c index 152e7a8..8ab6387 100644 --- a/gnome/pixbuf-loader.c +++ b/gnome/pixbuf-loader.c @@ -98,7 +98,6 @@ gdk_pixbuf__or_image_stop_load (gpointer data, GError **error) GdkPixbuf *pixbuf = NULL; ORRawFileRef raw_file = NULL; - (void)error; raw_file = or_rawfile_new_from_memory(context->data->data, context->data->len, OR_DATA_TYPE_NONE); @@ -129,9 +128,13 @@ gdk_pixbuf__or_image_stop_load (gpointer data, GError **error) context->user_data); } result = TRUE; + } else { + g_set_error (error, + GDK_PIXBUF_ERROR, + GDK_PIXBUF_ERROR_FAILED, + "Unable to load RAW file"); } - g_byte_array_free(context->data, TRUE); free(context); return result; |