[gthumb: 2/4] image loader: return error if the image content is null
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb: 2/4] image loader: return error if the image content is null
- Date: Mon, 30 Aug 2021 17:58:27 +0000 (UTC)
commit 9648f6dc8f82f8d5f85b6e340cb5170713e28ffa
Author: Paolo Bacchilega <paobac src gnome org>
Date: Mon Aug 23 08:14:29 2021 +0200
image loader: return error if the image content is null
gthumb/gth-image-loader.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/gthumb/gth-image-loader.c b/gthumb/gth-image-loader.c
index 0564d651..dee2b5dd 100644
--- a/gthumb/gth-image-loader.c
+++ b/gthumb/gth-image-loader.c
@@ -260,6 +260,14 @@ load_image_thread (GTask *task,
_g_object_unref (istream);
+ if ((image != NULL) && gth_image_get_is_null (image)) {
+ _g_object_unref (image);
+ if (error == NULL)
+ error = g_error_new_literal (G_IO_ERROR, G_IO_ERROR_FAILED, "Error");
+ g_task_return_error (task, error);
+ return;
+ }
+
if ((image != NULL)
&& ! g_cancellable_is_cancelled (cancellable)
&& (self->priv->out_profile != NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]