From 84c47861ada7b045a88653b19b3d785dd1b59dae Mon Sep 17 00:00:00 2001 From: sergiotarxz Date: Sun, 23 Jan 2022 11:03:40 +0100 Subject: [PATCH] Adding g_task_set_return_on_cancel. --- src/util/soup.c | 1 - src/view/picture.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/soup.c b/src/util/soup.c index bdc8342..5841a2f 100644 --- a/src/util/soup.c +++ b/src/util/soup.c @@ -54,7 +54,6 @@ mg_util_soup_get_request (MgUtilSoup *self, const char *url, gsize *size_respons g_value_unset (&response); g_clear_object (&soup_session); g_clear_object (&msg); - return return_value; } diff --git a/src/view/picture.c b/src/view/picture.c index 9d47137..5c01dbe 100644 --- a/src/view/picture.c +++ b/src/view/picture.c @@ -126,6 +126,7 @@ create_picture_from_url (const char *const url, gint picture_size, attrs->image = image; attrs->picture_size = picture_size; g_task_set_task_data (task, attrs, free_picture_thread_attributes); + g_task_set_return_on_cancel (task, true); g_task_run_in_thread (task, threaded_picture_recover); } cleanup_create_picture_from_url: